News for hackers. Stuff that matters.
Re:I made a Phoenix webapp as a veteran Rails dev by dozzie on Sunday May 21, 2017 @11:51AM (#14387794)
Because it's not superior, not on its own. You need context to tell which one is better. Not to mention that you look too closely, so you miss higher-level design that makes the difference between functional and imperative languages.
Re:I made a Phoenix webapp as a veteran Rails dev by hartator on Sunday May 21, 2017 @02:17PM (#14388389)
Can you provide a minimal example where functional clearly overtake oop?

Bad oop is clearly inferior to good functional. ie React. But if OOP is able to do functional as well, shouldn't OOP win on the long run?

Re:I made a Phoenix webapp as a veteran Rails dev by easychris on Sunday May 21, 2017 @03:14PM (#14388698)
I think it's also about the ecosystem. With Elixir all third party packages etc. can be relied on having no side-effects / immutability.

If you try to code functional in an OOP language, you would have to make sure that no third party modules (or coworkers accidentally) write code that "misbehaves" in such aspects. Just like you currently have to make sure that the Ruby code you use is threadsafe.

With immutability you gain all those features baked into Erlang/OTP (scalability, reliability).

Re:I made a Phoenix webapp as a veteran Rails dev by atom-morgan on Sunday May 21, 2017 @02:02PM (#14388310)
When coding moves from science to art.