3 ms·
I don't remember seeing Erlang as the main criticism against Elixir. The common problems as far as I recall: 1) Stale or missing libraries 2) Small community (h
by joelbluminator 5y ago
I don't remember seeing Erlang as the main criticism against Elixir.
The common problems as far as I recall:
1) Stale or missing libraries
2) Small community (hard to hire, missing resources)
3) High learning curve (Genservers, OTP etc) and the fact you basically need to learn 2 languages at once (Elixir and Erlang).
- 1_player 5y agoLast point isn't true. I've been working full time with Elixir for 3 years and I can't write any Erlang. I can read it, just because it's not that complex syntactically. But I should learn Erlang eventually.
- lostcolony 5y agoI'll say the high learning curve statement isn't really true for Erlang either. I was up and running with Erlang as a mid level dev back in 2013 or so within 2 weeks. Worked through LYSE, and basically grokked everything I needed to, genservers and OTP included. Only thing tricky after that was building a release (since at the time the best tooling was rebar; Elixir's mix makes this really simple).
- dnautics 5y agosame, I can read erlang extremely effectively. Even better than some erlang devs. I can also patch erlang libraries (I fixed my friend's http library to be able to do streaming http 1.1). I can't write it, though.
- linkdd 5y agoErlang's syntax is so simple I've been able to read the source code of RabbitMQ before even knowing the language. Quickly going through https://learnyousomeerlang.com/ https://learnyousomeerlang.com/ to discover OTP, processes and supervisor and you're ready to code. After learning Erlang, and writing some basic stuff with it, I discovered Elixir and had nothing to learn except: - "defmodule" instead of "package" - "@callback" / "@behaviour" instead of "callback" / "behaviour" - ":an_atom" instead of "an_atom"
- dnautics 5y agothere are a handful of things that make elixir way more ergonomic. For example, in a really big codebase if you want to zoom to a function definition you just have to search "def/p function_name". Aliasing is very nice, though confusing if you are coming from a language where module names are first class (and not just atoms) like Julia.
- dqv 5y agoThere are a few more concerning proplists/keyword lists: [{:x, "y"}], [x: "y"], ["x": "y"], and x: "y" are the same thing (if in args). Erlang dictates one syntax for this instead ([{x, <<"y">>}]) (ok you COULD say that technically 'x' works too) The pinning operator x = :x; {^x, y} = {x, "y"} Exceptions are slightly different. There are a few others that made me realize "oh shit I need to learn Erlang first."
- linkdd 5y agoMy point was that Erlang and Elixir aren't that different. You can totally not use the syntactic sugar for proplists, it will still work the same. Therefore saying "you need to learn 2 languages" isn't correct. It's like saying Javascript/Typescript are 2 different languages. Well yes, but if you're fluent with Javascript, you'll be able to read typescript, and if you're fluent with Typescript, chances are that you are fluent with Javascript too. But I agree that one should learn Erlang first, because most of the documentation about Elixir seems to assume that you already know Erlang/OTP.