2 ms·
Syntactic sugar is of course another form of abstraction and so you have to balance developer ergonomics with that added complexity. As you point out, Elixir's
by supernintendo 5y ago
Syntactic sugar is of course another form of abstraction and so you have to balance developer ergonomics with that added complexity. As you point out, Elixir's `GenServer` is a fairly simple wrapper module over Erlang's own `gen_server`. As new versions of OTP are released, the maintainers of the Elixir language must also update their own abstractions over those underlying Erlang libraries. It also creates a niche disparity between Erlang and Elixir which some Erlang developers might find superfluous. Coming from Erlang, it's easy to appreciate the syntax of Elixir even if it means getting over some old habits. Perhaps changing the names of foundational parts of the standard library would be less appreciated by those already familiar with OTP, and feel as if the mental overhead is being shifted to those developers rather than simply being ameliorated for developers who are new to the platform.
Designing a programming language is hard, especially when building on top of a 35 year old language like Erlang. As is often the case: if engineers could change the past without breaking everything in the present, we would have already done it. :)
- pmontra 5y agoThey did the right thing if their goal was to move Erlang developers to Elixir. Not so much if they aimed to onboard Java or C++ developers. If they did, GenServer had to look like a Class like and they would use { } instead of do end. Strangely it seems that they aimed to Ruby developers (like me). That's why they picked do end and similar names for modules and functions. But Ruby developers wouldn't mind a GenServer looking like a class with proper function names instead of atoms in argument lists.