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

This is a huge part of it, for sure.

I think this is why people often dislike state machines too, for example. They force you to really think through what you're trying to do, and there are no shortcuts.

The irony is that the state machine pattern itself kind of is a shortcut to stable, reliable, safe code. People find them overly complex and full of ceremony, but it's like... Do you really want to try getting the same assurances from your code without this kind of abstraction? I'd rather know my I can't shoot myself in the foot, because I guarantee you that I will.

Elixir also has the added layer of unfamiliarity for a lot of people (myself included) where you might intuitively know how to do something imperatively, but you need to do it within the FP paradigm. I like FP and have adopted a lot of its patterns all over the place, but I still find I'm not a great FP thinker in general. After something like 10 years. My FP-fu is limited to relatively basic operations, and when I go into advanced territory I'm constantly leaning on reference material. That's more so a skill issue than an Elixir issue.



For the most part you really only need to know Enum.map, Enum.reduce and if you really hate recursion, Enum.reduce_while

And the nice thing is that those are highly imperative/declarative functionals.

Edit: ok, also "returning stuff out of if and case statements". That one kept triggering a python developer I had, had to remind him something like 20 times. Elixir would be way better if it had 'no shadowing variables' rules.




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

Search: