6 ms·
> how easy it makes to create a DSL (without leaving it). Pretty much impossible. If you don't leave your original language, you don't use domain specific lang
by dozzie 9y ago
> how easy it makes to create a DSL (without leaving it).
Pretty much impossible. If you don't leave your original language, you don't
use domain specific language, you just have general purpose language with
domain specific API.
- TeMPOraL 9y agoYou're missing the point. Some programming languages (Lisp family in particular) allow you to build DSLs directly, with the tools the language itself provides.
- dozzie 9y agoAnd then, inside this "DSL" in Lisp, can you have a completely different language, with significant spaces and unmatched parentheses? Or is it just Lisp data structures that are then interpreted and you're pretending to use language other than Lisp because of its flexible data structures notation?
- Koshkin 9y agoBut what is an API? Is it just a set of functions? Even then, it is already a language, with its own vocabulary. Or, is it a set of classes, interfaces, etc.? Then, even more so. And so on. Limitations and particulars of the syntax of a host language do not matter as much as you may think. Also, if you look close enough, you will realize that most of the languages already are, in fact, combinations of various built-in sublanguages, each having its own "subsyntax". What matters is the ease with which the host allows to create a new sublanguage that suits a particular purpose.