3 ms·
That’s why DSL-in-ruby is a moderately popular technique; the host language is expressive enough to host a DSL without a custom parser.
by danielheath 4y ago
That’s why DSL-in-ruby is a moderately popular technique; the host language is expressive enough to host a DSL without a custom parser.
- silon42 4y agoGive me an xml/json schema any day over this.
- danielheath 4y agoI fail to see how those things are at all alike. An xml/json schema is for validating a serialization format; a DSL-in-ruby is a programming language (to be fair, it's likely a mess, but I've definitely seen it be less mess). When you look at business rules / requirements, it's common for 99% of them to be trivial. Of the remainder, 99% are only moderately complex. If you have, say, fewer than 10k distinct rules, you probably don't have more than one that's really wicked. However, if you have 100k rules, it's more likely than not that you have quite a few that are going to completely wreck your xml/json model.
- seanmcdirmid 4y agoDSL in Kotlin is popular as well.