3 ms·
Elixir all the way. It's going to be a big deal. I've been doing Ruby for over 10 years. Never seen anything like Elixir. Rust, Haskell, Clojure will have the
by lectrick 11y ago
Elixir all the way. It's going to be a big deal.
I've been doing Ruby for over 10 years. Never seen anything like Elixir.
Rust, Haskell, Clojure will have their niches too. But Elixir will probably take over back-end web development.
- codygman 11y ago> But Elixir will probably take over back-end web development. That's a very large claim, can you give some more reasons as to why you think so?
- lectrick 11y agoGranted this is speculation, but I've done my homework: 1) Extreme concurrency due to Erlang underneath, which means not only being able to handle lots of connections at once, but very good DDoS resistance. See WhatsApp's blog post about it: http://blog.whatsapp.com/196/1-million-is-so-2011 http://blog.whatsapp.com/196/1-million-is-so-2011 An Elixir (or Erlang) process can fire up a million new nodes in a second on commodity hardware. No joke. The out-of-the-box concurrency in Elixir replaces many tools in Ruby that are normally separate gems: http://www.smashcompany.com/technology/ruby-concurrency-needs-microservices-but-not-elixir http://www.smashcompany.com/technology/ruby-concurrency-need... 2) Near-100% uptime possible. (Google "Whatsapp uptime"). Erlang was designed to run cell networks. It made them very reliable. The entire philosophy of the language is to "embrace failure, log it and try again ASAP." This ends up being a very good strategy when dealing with the uncertainty of the real world, and things like security concerns. 3) Live code upgrades without downtime. See this demo: https://youtu.be/96UzSHyp0F8 https://youtu.be/96UzSHyp0F8 4) MUCH nicer syntax than Erlang. Especially for ex-Rubyists. It's a functional language (with all the advantages that provides) with a Ruby-flavored syntax. Best of all worlds. 5) Phoenix, the Rails-equivalent web API, has come out of the gate with a 2 to 10x performance improvement over Rails using a fraction of the CPU load: http://www.littlelines.com/blog/2014/07/08/elixir-vs-ruby-showdown-phoenix-vs-rails/ http://www.littlelines.com/blog/2014/07/08/elixir-vs-ruby-sh... 6) Elixir provides true macros (in the Lisp sense). It seems to be the very first non-homoiconic (https://en.wikipedia.org/wiki/Homoiconicity https://en.wikipedia.org/wiki/Homoiconicity) language to pull this off: http://elixir-lang.org/getting-started/meta/macros.html http://elixir-lang.org/getting-started/meta/macros.html Macros allow for some very powerful code, but the homoiconicity of Lisplikes (which is normally the only place "true" macros are available) has been a turn-off for many. I probably don't need to sell you on macros if you're on Hacker News, Paul Graham has historically praised them as a key differentiator: http://www.paulgraham.com/avg.html http://www.paulgraham.com/avg.html Also see his praising of Lisp: http://www.paulgraham.com/diff.html http://www.paulgraham.com/diff.html 7) No reliance on the JVM (and its spinup time). 8) The tooling is fantastic so far- Mix is like a combination of "bundler", "gem" and "rake". The test suites run in parallel by default, which means faster code turnaround. 9) You can take advantage of the entire existing Erlang code library. Trivial to include it in your project and call into it. That's quite the bootstrapping, and eliminates a lot of upfront work to make things useful. 10) Harder to make bugs in general- Making state explicit means less coupling, dependencies and bugs. Immutable data means less bugs (and trivial concurrency). Pattern-matching means less control-flow logic, and again, less bugs. Using typespecs in conjuction with Dialyzer means less bugs: http://learningelixir.joekain.com/elixir-type-safety/ http://learningelixir.joekain.com/elixir-type-safety/ Less bugs means far more productive programmers. More resilience means more uptime and more resistance to DDoS and happier customers. Live code upgrades mean more uptime. Faster test suites means far more productive programmers. Nice syntax means it "feels nice" for Rubyists (and likely Pythonistas). Faster language, period, means less hardware is necessary. All of this and more, combined with the sense of intelligence and professionalism I'm detecting in the community (Jose Valim, Chris McCord, etc.) gives me a pretty good feeling about it.