Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I've done a fair bit of both Ruby and Elixir. My impression is that Elixir leaves a lot of the legacy cruft behind, and it has a much smaller language feature set (which is IMO big bonus). The language is pretty easy to grasp quickly as a result. There isn't much in the way of quirky syntax or backward compatibility weirdness.

Probably the biggest advantage of Elixir over Ruby is the runtime. The Erlang VM has proper concurrency, and it provides really nice primitives for working with it.

The ways in which Elixir sucks tend to be the same as Ruby: dynamic types, somewhat slow runtime (compared to C, Java, Rust, Go, etc). I'd also add that library support is still a bit weak with Elixir, but it's always getting better.



>somewhat slow runtime (compared to C, Java, Rust, Go, etc).

It's only slow if you are comparing a single-threaded operations, Erlang VM is designed to scale horizontally, not to be fast with one thread.


Elixir and Go both have similar performance (although Elixir tends to use a lot more CPU). Here's a pretty good blog post comparing Go, Node and Elixir: https://stressgrid.com/blog/benchmarking_go_vs_node_vs_elixi...


I hope I'm missing something here because that's an absolutely awful benchmark. Neither Go nor Elixir were stressed enough to start revealing failure symptoms, so Go could still destroy Elixir by 10x for all we know. Then Node was run single-threaded even though the test instances had 8 or 36 vCPUs.

But some people will still walk away thinking that Go and Elixir perform about the same while Node is 4x slower.


Eh. This blog post runs a single node process on a 36-core CPU. I'm not a fan of node but that's hardly a meaningful benchmark


How close does it come to matching the Ruby/rails gem ecosystem?


Phoenix is the closest, and while it's not exactly a Rails clone, it provides most of what you need to get started. It's similar to Rails in that there's a CLI to generate code, and frameworks for unit testing, DB modeling, templating, etc.

Where Phoenix really shines is its support for fancy stuff like Websockets and distributed messaging in your backend. Trying to do these things in Rails leaves much to be desired.


I mean more stuff like Devise for authentication, Apartment for multitenancy, ancestry for hierarchical data, etc. Seems like every common problem has a gem that solves it. Does Elixir/Phoenix have equivalents?


Triplex / Apartment Coherence / Devise ExAdmin / ActiveAdmin


Are they as good as the Rails equivalent?


IMO

+ Phoenix _better_ than Rails, which is very surprising

- less packages available, though almost everything covered by at least one package. ( hex.pm vs rubygems.org )




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: