Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

for 4) - ruby style DSLs. It's something that Erlang doesn't lack in principle due to parse transformations, but in practice, the difficulty of writing parse transformations and the sense in which prolog syntax doesn't lend itself to simple "english" like DSLs means people don't use them much.


Maybe it's just me, but I feel that in-language DSLs are one of the best ways to write unmaintanable, bug-ridden code.

Why? Once it's no longer syntactically clear what's written in the host language and what's written in the DSL, it requires a very thorough understanding of both languages and their interactions to comprehend any given piece of code. And in a language where definitions can be modified at run time or have dynamic scope (it's not clear which of these two methods Elixir uses), it's often hard to tell what is or is not DSL code in the first place.

(Note: I write DSLs for a living. Except, they live apart from any host language, and thus don't allow arbitrary syntactic and semantic mixing and are thus highly amenable to automatic analysis, which is one of, if not the, primary benefit of a DSL.)


Yes, this is precisely what I mean when I said "if macros worry you ..." in response to your question about unprincipled meta-programming. If you do not like Ruby-style DSLs then you would not like Elixir's use of macros to achieve similar goals.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: