3 ms·
Language design is very hard. Harder than API design. Most people are not much good at it which is why there are not many popular languages. Many people are goo
by discreteevent 7y ago
Language design is very hard. Harder than API design. Most people are not much good at it which is why there are not many popular languages. Many people are good at designing languages for themselves but that is much easier. On top of that, are you going to get time to document it? When the inevitable flaws are found will you still be there to fix and extend it in a consistent way? Will there be stack overflow posts there to help people work around it if not?
- TheOtherHobbes 7y agoDSLs are not general reusable computing environments. The goal is to encode domain logic into the language in a way that simplifies common domain problems. The problems may not look anything like the problems you can solve with a general purpose language. If they did, you wouldn't need a DSL. Of course you need to understand your domain really really well to do this with any success.
- goto11 7y agoThere is a sliding scale between API design and DSL design, at least when we are talking about internal DSL's. At what point does an API become a DSL? It is true that DSL's need to be documented and maintainable, but if you have the kind of problem when a DSL might be a solution, then not having a DSL would just express the inherent complexity in a different way. To put it another way, a clear abstraction layer (component, API, framework, DSL etc.) needs to be well-designed, documentated and maintainable, but this need is not avoided by having a system of the same complexity without such clear abstraction layers. Btw. I disagree about the popularity of general purpose languages. Some very popular languages (VB, JavaScript) are quite badly designed but a popular due to integration with a platform.