3 ms·
I couldn't agree more. As much as I like languages that facilitate DSLs, this is an unrealistic view of software development. To add to what you wrote, you hav
by jclos 14y ago
I couldn't agree more. As much as I like languages that facilitate DSLs, this is an unrealistic view of software development.
To add to what you wrote, you have to also consider that all developers in one team have to agree on a common DSL beforehand, which is an investment of time in itself, and the fact that if there is an unusually big change in requirements mid-development (which, let's be honest, is not a rare event), you might have to go back and change your "pyramid of DSLs" to accommodate it, maintain compatibility and update all your colleagues on the new languages.
- protomyth 14y agoHow is this any different than a team building a set of APIs?
- jclos 14y agoI see APIs as a less extreme version of DSLs (in that they share a common language, while building a DSL frees you from almost any restriction), but I honestly don't have enough experience building APIs or DSLs to give you a satisfying answer. Sorry.
- AnIrishDuck 14y agoThe syntax required to use the API will be instantly accessible to new developers. Many programming languages provide semantic guidelines for APIs as well. So knowing the language an API is programmed in gives you a huge advantage in beginning to understand it. With a DSL, all that goes out the window. The syntax of the language is potentially unknown to you. The semantics are an even deeper mystery. You're in terra incognito, trying to understand the mental process of the developer of the DSL before you can even understand what the code written in the DSL intends to do. The primary goal of programming languages is not to describe how to perform a complex task to a computer. It is to describe how to perform a complex task to other humans in a form that computer can also execute.
- protomyth 14y agoI'm not sure I buy the whole syntax argument. I programmed in Forth for a while and it seemed like it was much easier to build up an understandable vocabulary than some of the C++ / Smalltalk class hierarchies I have seen. REBOL has dialects that work fairly well. I cannot help but think that DSLs are refinement of APIs the same way C is a refinement of Assembler. When I talk to someone about what happens in a system it seems like a DSL flows from that conversation. "It is to describe how to perform a complex task to other humans in a form that computer can also execute." I think a DSL does that much better than a set of API calls, particularly when you involve non-developers. That is the point of a DSL.