News for hackers. Stuff that matters.
Re:We need less powerful languages by icebraining on Sunday November 15, 2015 @04:13AM (#10569019)
You talk about Scala and Clojure, yet they agree with you about the advantages of DSLs, which is why both promote their features as DSL-building toolkits, and there are plenty of modules for those languages that provide DSLs.

The thing with DSLs is that almost by definition, unless you're building something almost cookie-cutter, you can't build a whole system with a single one. So Scala and Clojure are supposed to be the common ground in which you use and connect the programs made in these DSLs. Of course, since these are internal DSLs, it's often hard or impossible to isolate the code written in the DSL from the rest of the program, so it's hard to apply optimizations and such, but you still gain the code reduction that you talk about.

Re:We need less powerful languages by fauigerzigerk on Sunday November 15, 2015 @07:33AM (#10569434)
>Of course, since these are internal DSLs, it's often hard or impossible to isolate the code written in the DSL from the rest of the program

Exactly, but that is also why you lose basically all advantages of DSLs. I don't think internal DSLs deserve to be called DSLs at all. They are simply libraries that tend to use a lot of operator overloading.

The whole point of DSLs is to formally restrict what a given expression could possibly mean. That's what allows inference, optimization and sensible error messages that use the terminology of the DSL and not that of some underlying much more general language.

Re:We need less powerful languages by tel on Sunday November 15, 2015 @12:23PM (#10570229)
It's trivial to via the use of types... So long as you have some amount of "purity" anyway.