6 ms·
Along the lines of comments below... what are the sweet spots people are finding for Elixir? I've used Erlang a lot in the past and like it, and would love to
by davidw 8y ago
Along the lines of comments below... what are the sweet spots people are finding for Elixir? I've used Erlang a lot in the past and like it, and would love to have an opportunity to use Elixir for some projects, but it seems that for regular old CRUD kinds of stuff, I'm not sure it's a win compared to Rails.
- dudul 8y agoYou may be confusing Elixir and Phoenix. Phoenix is the Rails equivalent in the Elixir ecosystem.
- davidw 8y agoI whipped off the comment pretty quickly. Yes, Elixir is the language and Phoenix the framework. My experience is that most people using Elixir are doing so via Phoenix, whereas Erlang tends to be used for more disparate things.
- freedomben 8y agoPhoenix is great, even for CRUD type stuff. It took a little bit of learning but now I can crank out a CRUD app just as fast with Phoenix as rails. I don't think I'll ever start a new app in rails again.
- amorphid 8y agoThis is a rather simplistic argument... With Ruby I find it hard to avoid using a debugger. With Elixir I never need a debugger.
- rhizome31 8y agoAs someone who resort to IEx.pry daily I'm curious if you have any tip to share about your workflow so that you don't need a debugger. To you use typespecs and Dializer? (I haven't looked into those yet.) My experience is that a good share of bugs is avoided thanks to immutability, but I still get nil-related issues now and again.
- _d8fd 8y agoFor me it's mostly about gow people use metaprogramming. In Ruby, if I'm trying to find the source of a dynamically generated method in a dynamically generated class, that usually requires me to run add a debug statement, run the program, and see what's being passed. Even if I have a stacktrace, I often find it difficult to understand what the code is doing without running it. I find Elixir code easier to read, and grepping my way through the code base is often enough. And to be fair, a debugger is often less than useful in macros involving AST & when dealing with a process that got a random message from who knows where.
- pejrich 8y agoI can't think of anything from Rails that I can't do in Phoenix (i've been a Rails dev for 6 years, and working with Elixir/Phoenix for 2). Of course when it comes to the more exotic or rare libraries, they might be easier to find gems for in Rails, than in Phoenix, but in my experience Phoenix has most of it these days. I would say as far as simplicity and dev speed goes, Phoenix and Rails are pretty similar, and Ruby and Elixir are pretty similar. Elixir has a slightly steeper learning curve than Ruby, and Rails has more tuts/docs/etc. than Phoenix, but that's about it. What exactly makes you say that Rails is a clear win over Phoenix for CRUD stuff?
- nickjj 8y agoAs someone who develops Rails and Flask apps but recently got into Elixir / Phoenix I haven't had too many issues with CRUD'ish style apps. My biggest concern is payment processing libraries are waaaaay behind in Elixir. For example, Stripe doesn't have an official Elixir library (but they do for Ruby and Python), so that leaves you with a bunch of community driven packages that are all in various incomplete states. Likewise PayPal has an official SDK for Ruby and Python but nothing for Elixir and it's very slim pickings on the community side of things here, to the point where I would feel uncomfortable using any of them. But other than that, things have been good so far. A lot of common CRUD problems are solved, for example with pagination Rails has Kaminari and Elixir has scrivener which took like 2 minutes to set up. You'll find well maintained libraries for a lot of common web dev functionality. Plus, things like Turbolinks works great with Phoenix if you're into that. Generally speaking you'll end up writing a little more code with Phoenix than with Rails, but I find it much easier to grasp what's happening in Phoenix because there's so much less magic (but not so little that you need to implement a million things yourself).