3 ms·
I've been a long time Rubyist (10 years now) and I'm really enjoying Elixir. What got me hooked was the simple syntax and wonderful documentation, both from the
by ryanbigg 10y ago
I've been a long time Rubyist (10 years now) and I'm really enjoying Elixir. What got me hooked was the simple syntax and wonderful documentation, both from the project itself and in the Programming Elixir and Programming Phoenix books.
The ease of navigating an Elixir project is a huge benefit. If I want to know where a function is defined, it's very easy to find it. There's none of this class-reopening or meta programming malarkey that you get in Ruby (where is a Rails controller's render method defined exactly?)... it's all right there in the module.
Another thing that I love is that it's trivial to separate processing of several pieces of data into separate Elixir processes. To do something similar in Ruby, I would probably need to either use concurrent-ruby or spin them off into a background job with Sidekiq. In Elixir, it's baked right in.
Elixir is well-designed, the community is very friendly and it's just a pleasure to develop in.
- ryanbigg 10y agoOh and Doctest is quite neat too!
- deleted 10y ago[deleted]
- Lordarminius 10y ago> The ease of navigating an Elixir project is a huge benefit. If I want to know where a function is defined, it's very easy to find it. There's none of this class-reopening or meta programming malarkey that you get in Ruby (where is a Rails controller's render method defined exactly?)... I would view Elixir as an improvement (iteration?) of Ruby built on Erlang. The article points out it was written by Jose Valim . It derives its structure from the documented shortcomings of both parent languages.
- _d8fd 10y agoOther than some superficial syntax similarities, I find Elixir to be nothing like Ruby. Pattern matching, immutability, OTP, and the actor model feel like building blocks from a whole different universe.
- goatlover 10y agoElixir does support Lisp-like macros for doing metaprogramming.
- jamescostian 10y agoI think this is very important. GGP wrote about Elixir's simplicty, but it's important to note that this simplicty is at risk whenever macros are involved. That said, I personally haven't had any issues with overly complex macros, but YMMV and macros certainly do open the doors to immense complexity. I do appreciate how Elixir tries to make them harder to write than normal functions, as if to say "are you sure you want to risk making this unclear instead of doing this another way?"
- enraged_camel 10y agoElixir docs specifically warn about this. http://elixir-lang.org/getting-started/meta/macros.html http://elixir-lang.org/getting-started/meta/macros.html Check out the Foreword section.