5 ms·
I've written a decent amount of Elixir for a personal project, and have come to a few conclusions. For a start, it's very different. That will become self evid
by dynamite-ready 6y ago
I've written a decent amount of Elixir for a personal project, and have come to a few conclusions.
For a start, it's very different. That will become self evident if you try to learn either Erlang or Elixir, when coming from a language like Python/C++/etc (and though Elixir looks a lot like Ruby, it's still more like Erlang, tbh). So that can be classed as a negative.
Secondly, fault tolerance in Erlang/Elixir/OTP is not quite as simple as commonly billed. Isolated processes and supervision trees can give you a lot of mileage, but the model is not a silver bullet. I found I still needed to create an error boundary to make an application 'Do the right thing' in very specific error conditions (for example, not killing a running process, when making a single, accidental RPC with the wrong arguments).
Apart from that though, I can't think of much else negative to say about Elixir.
The tools for introspection are amazing. I recently debugged a production issue by opening a console connected to a running system, and calling the functions I suspected to be failing to see what they were returning directly. Not sure if any other language has that facility.
Then there's all the stuff built into Elixir, like the test suite, the build tool, and even an official linter / code formatter.
Erlang interoperability is also a brilliant design decision. Anytime I need to use a library for a task, I look through the Elixir community first. But if I can't find something suitable, there's often Erlang code out there with years of Dev time behind it.
This is just a mere fraction of all I want to say about the language. And most it is very positive.
- gotts 6y ago>I recently debugged a production issue by opening a console connected to a running system, and calling the functions I suspected to be failing to see what they were returning directly. Not sure if any other language has that facility. Clojure has it.
- dynamite-ready 6y agoIt does get a little more involved in Erlang/Elixir though. It has a built in GUI program called 'Observer' that can even print out a real-time visualisation of your object and process tree. Amongst many other things.
- hvis 6y agoRuby does, too (DRb). Though one would need to set it up on on the production server to use it. That means writing some boilerplate.
- OkayPhysicist 6y agoGreat overview, but I'd have to disagree about being different being a negative. If you try to emulate what came before, then you miss out on the opportunity to build something better. The whole Ford and his better horse thing.
- GordonS 6y agoI might have misunderstood, but I took the comment to mean looking more like Erlang was a negative? Erlang's syntax is really divisive - just looking at Erlang code makes my head want to burst!
- perfect_kiss 6y ago> The tools for introspection are amazing. I recently debugged a production issue by opening a console connected to a running system, and calling the functions I suspected to be failing to see what they were returning directly. Not sure if any other language has that facility. twisted/python has had manhole facility since early 2000s, I still sometimes use it to day http://www.lothar.com/tech/twisted/manhole.xhtml http://www.lothar.com/tech/twisted/manhole.xhtml