Re:Why the Elixir language has great potential
by Lordarminius on Thursday December 22, 2016 @07:36AM
(#13236838)
> 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.
Re:Why the Elixir language has great potential
by _d8fd on Thursday December 22, 2016 @09:39PM
(#13242384)
Other 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.
Re:Why the Elixir language has great potential
by ryanbigg on Thursday December 22, 2016 @02:09AM
(#13235477)
Oh and Doctest is quite neat too!
Re:Why the Elixir language has great potential
by goatlover on Thursday December 22, 2016 @10:57AM
(#13238086)
Elixir does support Lisp-like macros for doing metaprogramming.
Re:Why the Elixir language has great potential
by jamescostian on Thursday December 22, 2016 @12:00PM
(#13238544)
I 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?"
Re:Why the Elixir language has great potential
by enraged_camel on Thursday December 22, 2016 @01:40PM
(#13239324)
Elixir docs specifically warn about this.
http://elixir-lang.org/getting-started/meta/macros.html
Check out the Foreword section.
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.