4 ms·
> Elixir does not compete with ... Ruby ... I think it does, actually, though not intentionally. José Valim was a Rails core dev and as far I can tell he took
by lighthawk 11y ago
> Elixir does not compete with ... Ruby ...
I think it does, actually, though not intentionally. José Valim was a Rails core dev and as far I can tell he took on Elixir to address concerns with performance.
In http://elixir-lang.org/blog/2013/08/08/elixir-design-goals/ http://elixir-lang.org/blog/2013/08/08/elixir-design-goals/ he says, "Given my previous background in Ruby, it is natural that some of the constructs added were borrowed from Ruby. However, those additions were a by-product, never a language goal." He follows this with a comparison of Ruby code to Elixir.
I'm heavy into Ruby but looking forward to Elixir gaining strength.
- josai 11y ago> I think it does, actually You may be right, but what I meant is that every rubyist i know looking into elixir is after massively persistent connections. Websocket, basically, to thousands or more clients. They are leaving ruby because it simply cannot offer that (I don't care what DHH says. No-one big is doing EM WS in production, nor should they). Phoenix has a steeper learning curve than rails but is addressing the new paradigm of persistent duplex connections. Rails remains unapologetically a request-based framework, ActionCable notwithstanding. That is fine. 99% of today's apps don't that. Right tool for the job! But to me, the future is very clear. I'm heavy into ruby too, but speaking pragmatically, it and elixir are playing different games in different ballparks. That's why I said they don't compete.
- sjtgraham 11y ago> No-one big is doing EM WS in production Are you kidding me? Look at Pusher, which is literally EM sitting behind Route 53
- lectrick 11y agoThere are many, many other selling points to Elixir/Erlang over Ruby, if you already like Ruby (and its syntax, some of its conventions, etc.) 1) Immutable data throughout- prevents certain classes of bugs 2) 10x faster- obvious benefit 3) Actual macros- the ultimate metaprogramming: http://elixir-lang.org/getting-started/meta/macros.html http://elixir-lang.org/getting-started/meta/macros.html 4) Functional paradigm- encourages decoupling of code by forcing state to be passed around explicitly as arguments, this also aids unit testing, it also reduces bugs further 5) Instant "forking" without having to worry about thread safety, and good semantics around it 6) Potential 99.999999999% uptime reliability (thanks to Erlang's OTP) 7) Hot-swappable code upgrades with no downtime 8) Pattern-matching reduces the amount of "switch logic" code greatly. In Ruby code I often saw complex logic branches with no test coverage- it's easier to cover those in Elixir when every "branch" is a different pattern-matched function 9) A bunch of neato things such as build-your-own-sigils, which felt even more "Ruby-like" than Ruby's own capability (or lack thereof) here: http://elixir-lang.org/getting-started/sigils.html http://elixir-lang.org/getting-started/sigils.html 10) Trendy Actor model built-in from the get-go ;)
- lighthawk 11y ago> A bunch of neato things such as build-your-own-sigils, which felt even more "Ruby-like" than Ruby's own capability I like custom sigils, those are pretty cool, e.g. def sigil_i(string, []), do: String.to_integer(string) But, having to put that char into the method name rather than argument, doesn't that limit the characters that you can use? Seems like would be better as arg.
- lectrick 11y agoI agree with that... Perhaps it's limited that way on purpose?
- drieddust 11y ago6) Potential 99.999999999% uptime reliability (thanks to Erlang's OTP) I don't have much understanding of programming language internals but why we don't thing see low level stuff like distributed file system written in Erlang. I genuinely interested in knowing why this is not tried by someone?
- karmajunkie 11y agoAdd one to the column of people who are into Elixir for reasons that have nothing to do with websockets.