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

I've found most Elixir projects I've taken a look at to be surprisingly easy to follow when I've needed to.

I've dug into Ecto, Ecto SQL, Elixir itself at times. This was just because I was trying to figure out some corner-case behavior. The overhead of understanding someone else's classes when I tried similar things in Python was always just a much heavier mental load. Idiomatic or not.

As mentioned by another comment, the important thing is that each function you need to read can pretty much be read on its own. You might need to follow a few trails. But the way a library can hide where the magical state comes from in a Python class is sometimes maddening. I know, because I've written that code.

I find Elixir incredibly readable, nicely writable and the mental overhead continuously lower.



Not sure if it's me but I find decorators a terrible annoyance most of the time if I am reading random code in the wild. It feels like magic with a can of worms that you have to go through multiple files to fully understand.

I like them for use in some bigger frameworks but overall, they seem to provide negative value to me as a reader, often confusing names doing some magical coating which could very well be solved with pure function composition.

I have noticed some python projects making heavy use of it... they rely on you to read their guide to write code instead of switching and using the project fine because you know the language. Sort of like another DSL?

Elixir hits the balance for me between being not too intense (haskell) and friendly usable with a nice community.


Generally I agree, but I've found it hard to parse macro logic in projects that I am not familiar with.

I've written a project that uses macros heavily as well and it's hard to make it easy to understand.

It's a double-edged sword. Macros are nice and can simplify the top-level API significantly, but at the same time they add complexity under the hood.


The biggest sin is that it's too fun to write macros in elixir.




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

Search: