3 ms·
Can you explaint to me what all these little DSLs are useful for? I have heard this being presented as an advantage for Ruby before, but can't really think of m
by lenni 16y ago
Can you explaint to me what all these little DSLs are useful for? I have heard this being presented as an advantage for Ruby before, but can't really think of many use cases for DSLs (apart from business rules).
- masklinn 16y ago> Can you explaint to me what all these little DSLs are useful for? Writeability and readability. The ability to bring in domain experts which have no knowledge whatsoever in programming as well. > but can't really think of many use cases for DSLs (apart from business rules). Any domain-specific knowledge/data may be encoded as a DSL, and benefit from it. The rules of your business, the URL mapping of your framework, the GUI layout of your application, the steps of your tests, ... In fact, they often are (in WPF, XAML is used as a GUI definition DSL; Ant is a domain-specific language for building applications, so is Make). The great advantages of the likes of Ruby, however, is that you can build DSLs in the language itself (you don't have to build your own compiler and translator from DSL to language), which rids you of most of the complexity and limitations of usual DSLs, and lets power users realize that there is a full-blown general-purpose language under the DSL (and use that power when they need it).