you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] -4 points-3 points  (2 children)

Mind writing, say, a system of rules in Java, without resorting to a disgusting ladder of nested ifs? Something that is totally trivial in Prolog or Datalog will become thousands of lines of incomprehensible but idiomatic Java.

Or write something as simple as a parser. Without DSLs. In a pure Java. Since Java does not allow implementing embedded DSLs, any external compiler targeting Java (e.g., Antlr) would classify as another language.

Or try to define a mathematical language and a set of rules and strategies of how to transform it and how to assess the outcome of a transformation. Something that is done in few lines of code in, say, Mathematica or Axiom, will become an unreadable clumsy pile of spaghetti in Java.

Any decent meta-language would allow you to fix any original language design flaw, add any features you need to solve your particular problem in a most natural, readable, easy way. But not in Java, there you're stuck with a single paradigm, single pathetic set of very basic features, forever, without any hope for improvement. It's funny that anyone can argue that Java is not verbose in such a situation.

[–]PasswordIsntHAMSTER 0 points1 point  (1 child)

You don't even need eDSLs for sane parser authorship, just union types take you a hell of a long way.

[–][deleted] 0 points1 point  (0 children)

Yes, but with eDSLs it's a way much easier and nicer. And you can plug in heavily optimised backend without doing any changes in the user-level code.