3 ms·
I started playing around with Elixir a while back and find it really fascinating as a language. I've been a Scala dev for years and I gradually learned FP by m
by djsumdog 9y ago
I started playing around with Elixir a while back and find it really fascinating as a language.
I've been a Scala dev for years and I gradually learned FP by moving from Java to Scala, but in the case of Elixir, I've only barely looked at some Erlang previously.
Would you say Elixir has done a better marketing job of being accessible to developers?
- weatherlight 9y agoAbsolutely.
- andy_ppp 9y agoMarketing is better than Erlang (not difficult: http://erlang.org/doc/man/lists.html http://erlang.org/doc/man/lists.html), but also it stacks up to some analysis rather than just being hype. Largely due to it being based on Erlang but also developer friendliness (build tool, docs, security, setup, simplicity) is really second to none for a compiled language.
- pdimitar 9y agoElixir has pretty solid marketing indeed but IMO the tooling is what really makes it shine. Hex and Mix are the simplest, cleanest and most straightforward tools I ever used for 16 years of career. Add OTP, friendly syntax and mature runtime to the mix and IMO Elixir is right now unbeatable in the realm of dynamic compiled languages.
- ch4s3 9y agoI think it's not so much marketing as developer experience, and tooling. As a sibling post mentions, Mix and Hex are amazing. Mix new is a very nice gateway into a new project, giving you a fully working setup and even setting up the basics of a supervision tree, if you want it. Beyond that, it makes some less approachable aspects of OTP much simpler for a newcomer to use. Once you get the basics, Genservers are very nice to work with.
- klibertp 9y agoThe stdlib is also a strong selling point of Elixir. Agent and Task modules are a nice addition. AFAIK they have no equivalent in Erlang stdlib. It's trivial to implement them on top of gen_server, but that's it - you need to reimplement them every time, while in Elixir you have them available by default. DynamicSupervisor is similarly a nice(r) interface to simple_one_for_one supervisors. In terms of language features, Elixir gives you (almost first-class) modules, protocols, and macros. They are all implementable in Erlang, for example qlc is a DSL implemented with parse transforms (which are macros), but Elixir gives them to you nicely packaged and ready to use. It can also become a problem. I love Lisps, and love proper macros, but every other macro I see written by Elixir guys makes me cringe. Macros are a powerful tool and it takes time and effort to learn not to abuse them. In Lisps, even the younger ones, like Clojure, people only write macros if there's really no other way to do something. In Elixir, people write them for everything, they break hygiene habitually, and the language encourages that (the `use` and `__using__` are the biggest offenders here, IMHO). It's a trade-off between easy-to-write (in Elixir) and easy-to-read-and-debug (in Erlang). Both approaches are valid, but for different use-cases.