4 ms·
> The difference between a DSL and an API? An API uses the host language's syntax, but a DSL introduces its own syntax, which must then be parsed. Well, this i
by apgwoz 18y ago
> The difference between a DSL and an API? An API uses the host language's syntax, but a DSL introduces its own syntax, which must then be parsed.
Well, this is a conundrum then. You can't just create new syntax in languages that don't support a way to extend the syntax (see Lisp macros, and I even get to mention TCL here). So, most of what we normally call "DSLs," (i.e. method chaining languages, overloading operators) aren't.
So, I guess we should start calling them Domain Specific APIs--DSAPIs, if you will.
- cabalamat 18y ago> So, most of what we normally call "DSLs," (i.e. method chaining languages, overloading operators) aren't. I don't call these things DSLs. Other people might.
- wilkes 18y agohttp://www.martinfowler.com/bliki/DomainSpecificLanguage.htmlFowler http://www.martinfowler.com/bliki/DomainSpecificLanguage.htm... distinguishes between Internal and External DSLs. Internal DSLs are a style of programming, usually non-idiomatic. External DSls require parsing.
- apgwoz 18y ago> Other people might. Other people do. Maybe it's not the proper terminology, but it's too common to ignore it.