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

The explicitness of Erlang is exactly what Elixir is lacking. A /lot/ is done via macros. This makes it really easy to build domain-specific language extensions, but it also means that you'll have to learn what they are doing to fully understand the code.

In Erlang, the few simplifications you get are very local (as long as you don't apply a parse_transform on your whole project, which is rarely a good idea).



I agree, and I'm a rarity maybe, because I think it is much easier to understand and debug Elixir if you learn Erlang first. You don't have to, in order to code in Elixir, but understanding what was going on under the hood made it much easier for me to work with Elixir.


I understand how that could be a problem. However it never was with the countless DSLs I saw in Ruby. The trick is never write one. Only use the ones of widely popular projects.

I never wrote a macro in Elixir (only for experimenting with them), nobody ever did in the projects I worked on and I'm perfectly happy with that. On the other side everybody uses macros, mainly with/do/else. I wish they implemented it as keywords of the language. They could probably have spared us the annoyance of converting code from = to <- and comma everytime it is moved inside a with and viceversa. That's the part of the syntax that I like less.


which DSLs are you talking about, as far as I know the only truly heavy-handed DSLs in common use in the Elixirverse are Phoenix, Ecto, and ExUnit.

- I'll say that Phoenix Macros somewhat annoy me, but i can see why they would be useful for someone with a Rails background (which I am not).

- I'm quite happy with not having to think about how Ecto marshals its queries into SQL. Life's too short for that.

- Is it really such an impediment to code grokking to have a `test "label" do...end` construct?




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

Search: