5 ms·
The heart of Elixir :)
by daitangio 3y ago
The heart of Elixir :)
- jacquesm 3y agoElixir: a relatively thin layer around Erlang that you eventually have to learn anyway. Elixir is sort of a gateway drug to Erlang, sooner or later you want the real thing.
- di4na 3y agoI maintain erlang libraries. I contributed to OTP. I am from Elixir. I cannot agree. Erlang is a pita to with. From the lackluster test libraries, the lack of module aliasing, the atrocious UX of parse transform, and so much more. Erlang bring nearly nothing that Elixir cannot do and the UX of elixir is by far better. And I am not talking of syntax here.
- jacquesm 3y agoI think what you're seeing here is a difference in age and general approach to programming. I learned how to program in the 70's and early 80's. Back then anything that didn't require punch cards and line editors was considered an amazing luxury. I never really grokked IDE's (though: TurboC and TurboC++ got pretty close on Windows) and I tend to remember the bits of a language and eco-system that I need. Erlang was made by and for that generation, with the tools that were there at the time and so it 'speaks to me' in a way that I'm familiar with. Going on the assumption that you've learned to program a little later, by the time that eco systems were more fully featured, IDEs were commonplace and things like test libraries and namespaces were common I can totally understand why something like Erlang would leave you frustrated. But to me it is a luxury and always will be. So long term, Elixir probably has the future, but that battle hardened foundation that it builds on stems from a different era, where reading the documentation was a prerequisite for doing anything with a system and all systems had their little quirks. Erlang's roots in turn are partially in Prolog, which is another one of those beasts of times long gone, it too is quirky and some of that shows through in Erlang and the way it approaches things. In my experience it pays off to embrace such things rather than to fight them, then you can spend your time and energy far more productive rather than to let it be in the front of your focus while you're trying to get some work done. In the end it is all tools, and just like in the trades there are no bad tools.
- depr 3y agoIf there are no bad tools, why use Erlang at all instead of for example, Java, C, C++ or Python which all have a larger ecosystem and user base?
- jacquesm 3y agoBecause tool quality is only one dimension to a choice. There are no bad tools: but there are tools that are more suitable to a particular purpose. For instance because of interop, existing infrastructure, team experience, access to specialists, natural fit between tool and problem, availability of existing libraries and so on.
- sodapopcan 3y agoSo TL;DR: "Elixir is a gateway drug to Erlang, unless you were born after 1979" ;)
- jacquesm 3y agoThe Elixir programmers that I know describe it as 'biting the bullet', going from their familiar environment into something that is pretty alien to them. Instead of all the luxury you are used to suddenly you have to get into the mindset of programmers that didn't have access to all of these fancy tools (and sometimes very useful tools). For example, debuggers are to me a luxury, I am used to reason about what my code does before writing it. If your first reflex upon reaching an issue with your code is to reach for a debugger to see what it does instead of what you meant then you will probably never really train that reasoning ability. This also tends to be a dividing line between 'gluing APIs together to get something that works' versus building something from the foundational pieces offered by the language and then integrating that into a larger whole. OTP is a fantastic example of this sort of thing: it is arcane, fairly complex but surprisingly well built and the quality of the architecture is something most modern frameworks can only dream of. The only reason it is still around is for the same reason that crocodiles are still around: it is extremely well adapted to the niches where it is present, all the other stuff has died out. You can re-invent all (or usually part) of OTP in any language and there have been many attempts at doing just that. But why would you? It already exists and it is far more battle hardened and time tested than anything new likely will ever be. Ok, you'll have to bite that bullet...
- anonyfox 3y agoWhile I agree with the sentiment, there are two superpowers in the mix for me (pun intended): 1. Erlang / BEAM itself as the runtim with lots of powerful capabilities (what you probably are talking about) - you need to know this stuff at some point to fully leverage the technology 2. Elixir the language (+ excellent modern tooling) ontop, which really helps to significantly speed up productivity/average code quality - I don't like to over-reductionist approach here, DX is also an important thing to consider instead of the raw foundation
- lazysloth 3y agoElixir brings so much to the BEAM ecosystem with the improved UX from the tooling and libraries. If you want a better language on the BEAM go with LFE in my opinion.
- KingMob 3y agoI'm very curious, what's the LFE experience like? Are you in the REPL all day? Any major interop issues?
- toolz 3y agoI've been writing elixir for 8 years. I've never once wanted to write erlang, nor have I ever written erlang programs.
- cpursley 3y agoSame. I’ve had to call a handful of Erlang functions from Elixir over the years but never had to dive deeper than that.