4 ms·
I switched to Elixir and Phoenix this year, and Elixir is a joy to write in. It makes me so happy to write less business logic by leveraging their pattern match
by dmak 4y ago
I switched to Elixir and Phoenix this year, and Elixir is a joy to write in. It makes me so happy to write less business logic by leveraging their pattern matching. I struggle going back to other languages and have to re-adapt a lot.
I love Ruby, but Elixir/Phoenix is the natural next step after Rails.
- onlyrealcuzzo 4y agoRuby is an incredibly flexible language. Elixir & Phoenix are great, but I'm quite confident whatever you're doing in Elixir/Phoenix - you could, with minimal effort, also do in Rails. The reason to use Elixir/Phoenix is not because of pattern matching - it's because of the BEAM VM. If you don't need it or want it - you're probably better off with Rails.
- saltcod 4y agoooh been wondering this for ages actually. (I've played with Rails a bunch, but never E/P) Why do you say you'd prob be better off with rails?
- onlyrealcuzzo 4y agoTHE point of using Phoenix is to run on the BEAM. If you don't want or need that, there's really no reason to use Elixir/Phoenix. Ruby on Rails is much more widely used - so you're going to be able to find more community support & libraries & integrations than you will with Phoenix. Why tie your hands behind your back if you don't need the BEAM?
- dmak 4y agoWhat issues do you have with BEAM?
- dragonwriter 4y ago> I switched to Elixir and Phoenix this year, and Elixir is a joy to write in. It makes me so happy to write less business logic by leveraging their pattern matching. Pattern matching does streamline a lot of logic, which is a big reason Ruby added it in version 2.7, three years ago. But, while, there are reasons I can see that one might prefer Elixir/Phoenix today, “you can write less logic because pattern matching is available in Elixir” isn’t particularly one of them.
- dmak 4y agoIt's not the same as Elixir at all. Elixir takes it further and allows method overloading, so you can pattern match methods with the correct arguments. I would suggest giving Elixir a try if you haven't yet!