5 ms·
I have been using Elixir for a while now! I'll never go back to Go or Node.js by choice.
by jtwebman 11y ago
I have been using Elixir for a while now! I'll never go back to Go or Node.js by choice.
- bhrgunatha 11y agoOut of interest - why not?
- jtwebman 11y ago1. Readability is probably the biggest reason. I don't have to worry that some base object changing what I am thinking is happening. There is little magic and it is easy to follow. 2. Let it fail, elixir and erlang you have to write code assuming it is going to fail and handling when it does. Most other language you have to write that code all over in your logic code. Elixir and erlang you do not (readability again). 3. OTP! There is a great distributed framework that erlang and a bunch of much smarter then me programmers built over the last 20 year that I just get to use. Also you can send functions and code over the wire as well to run. Making some very interesting things that are just impossible to do in other languages. These are just a few reasons. I do build mostly build web applications for business apps. So because of that this is a really good fit. I don't think it is the answer to all but it has been expanding fast. The one thing I wish it had would be that your dependencies were yours only. I think this is one of the big reasons Node.js got successful so fast. In node you can run different versions with-in the same app depending on the libraries. Elixir is more like ruby in that you can only have one. Well you can have two for swapping out without down time but that is it. I do think this is one of the limits to the Erlang VM.
- Skinney 11y ago> Also you can send functions and code over the wire as well to run. Making some very interesting things that are just impossible to do in other languages. Well, you could do this in any language that has 'eval' really, which includes most dynamic languages. Unless you're referring to something else?
- dxhdr 11y agoErlang provides location transparency for processes, meaning that you can send a message to a Pid (process identifier) as if it were running locally, when in fact it's running on another VM on another machine.
- hackerboos 11y ago> Unless you're referring to something else? jtwebman means. Elixir uses the actor model to enable concurrency across processes (internal and external). It's very very easy to scale horizontally using BEAM.
- rozap 11y agoI can't speak for Go, but Elixir has a much more sane concurrency model when writing web services (or otherwise) than node. The ability to block a process means you don't need to dork around with callbacks or promises or anything, your code looks like it executes in serial. No shared memory either, so one request can't break another. The set of abstractions OTP provides map onto web services perfectly. Once you write stuff in erlang/elixir going back to another paradigm is really quite hard.
- ams6110 11y agoWhy Elixir over native Erlang? Nobody including the original piece seems to address this. Is it just a subjectively nicer syntax?
- biokoda 11y agoThe biggest obstacle to erlangs adoption is that it does not have a low barrier to entry. The syntax is strange, the way of structuring and building solutions is strange. It is incredibly powerful, but it requires a different way of thinking. Elixir makes sense because it is a lower barrier to entry. This is a very important factor. It is one of the main reasons why node.js was so successful in reaching a large audience. It is why Go is more popular than Erlang. They are often used in the same domain and Erlang is arguably more powerful. People still choose Go however.
- pjmlp 11y agoStrange for those that never did Prolog. I was really into Prolog back in the university days, to the point of being into logic programming competition between universities. Got to understand Erlang at the first try, when reading about the language or watching web talks. It pretty much depends from where one is coming from.
- biokoda 11y agoThe vast majority of programmers never used or cared about Prolog.
- porker 11y agoThey have missed out. In terms of elegance, I've never written anything that surpasses Prolog. For a defined subset of problems.
- pjmlp 11y agoMost Portuguese universities had Prolog on their CS degrees in the 90's. Also most companies HR departments will ignore CVs without an EE or CS degree from those same universities.