News for hackers. Stuff that matters.
Re:Ask HN: Which functional language has the best ecosystem ... by mercer on Wednesday January 17, 2018 @02:13PM (#16170803)
While I don't disagree entirely, I find that Elixir is actually quite functional. Using processes for state as if they're objects is generally considered bad practice.

I can highly recommend this article (also just in general for people curious about Elixir): http://theerlangelist.com/article/spawn_or_not

A quote:

> But before starting, since this is going to be a long article, I want to immediately share my main points:

> Use functions and modules to separate thought concerns.

> Use processes to separate runtime concerns.

> Do not use processes (not even agents) to separate thought concerns.

> The construct “thought concern” here refers to ideas which exist in our mind, such as order, order item, and product for example. If those concepts are more complex, it’s worth implementing them in separate modules and functions to separate different concerns and keep each part of our code focused and concise.

> Using processes (e.g. agents) for this is a mistake I see people make frequently. Such approach essentially sidesteps the functional part of Elixir, and instead attempts to simulate objects with processes.

There are no comments on this comment yet.