4 ms·
I used to work at a company in a similar vertical as BR also linked off CNN frequently and also running Rails. I understand the scalability challenges that migh
by rubyfan 9y ago
I used to work at a company in a similar vertical as BR also linked off CNN frequently and also running Rails. I understand the scalability challenges that might lead someone to something like Erlang and Elixir.
Curious, what’s your take on why this hasn’t caught on?
- danso 9y agoI've only played around with Phoenix/Elixir so can't claim to have any special knowledge. But I've heard it argued that functional languages/frameworks aren't as common in startups as expected because functional programming isn't as popular among current developers, nor as commonly taught in school. And Erlang seems to be particularly specialized: https://news.ycombinator.com/item?id=7277797 https://news.ycombinator.com/item?id=7277797 Elixir is relatively new (2011), Phoenix even newer. Maybe it's too early to say whether or not it will take off in the same way Rails did? And maybe it won't ever take off because Node/Express brings sufficient performance while allowing developers to use JavaScript, arguably the most popular language in production today.
- jetti 9y agoAs somebody who has been diving into Elixir and Phoenix this year I have to say that the Phoenix way into Elixir isn't as exciting as a backend application written in Elixir in regards to the power of the language and the platform. A lot of Phoenix is hidden and is "magic". You don't need to utilize the OTP at all when using Phoenix and you don't interact directly with what makes Elixir (and Erlang) so special. I started using Phoenix and Elixir and while I liked Elixir's syntax better than other languages I just didn't see what was so great about it. Then I started doing non-web things with Elixir and it became clear how awesome Elixir is. I heard the same thing with Ruby back when I looked at Rails 5 or so years ago. Elixir seems like just another language when you aren't really digging into the OTP.
- jetti 9y agoI think Erlang hasn't caught on because of its syntax. It is much different than anything else I've seen (that wasn't an esoteric language). That syntax will rear its ugly head when using Elixir as well since you have to dive into the OTP every so often. Given that Elixir is built upon the BEAM it isn't a surprise that Elixir isn't more well known. Then there are documentation issues. Hexdocs.pm is amazing and typically there is enough information to get started and going but that is typically at a higher level and that is also not written in a way that is necessarily friendly to those outside the HN crowd. Sometimes there will be a single example of how to do something and sometimes there won't be a single example, which means you have to figure it out. There are sites like Elixir School (which I have used) but it is little more than a re-hash of the official Elixir tutorials. Now, there are some projects with great documentation (Phoenix is one of them) but most are not that in depth. When dealing with OTP (which is part of what makes Elixir so great) you run into issues with the documentation and then Erlang syntax. For instance, I'm working on a blog engine that I want to run fully contained using Mnesia, the OTP relational database. There is no Elixir support for Mnesia so I have to fall back to Erlang. Now I'm learning Erlang's syntax, which is slowing me down significantly. Now, I want to do this and my design decision is to use Mnesia so I can not have to worry about dealing with a standalone RDMS so this setback isn't pulling me down but if I was a beginner just trying to learn I would've given up by now. Let's talk library support. There are a lot of great libraries that are written by Jose and the Elixir core team but there is a lot of gaps as well. Odds are if there is an API you want to call you won't find an Elixir library for it and you'll have to go at it yourself. There isn't anything wrong with that if you are willing to take the time but if you need to get stuff done then it is just a hassle. Again, I'm doing my Elixir work on the side so I have plenty of time to make libraries (I have made a couple so far and am in the process of making more) to help others do what I need to do. Finally there is the thought shift that is required to fully embrace Elixir. Elixir looks Ruby-ish but idiomatic Elixir is much different that Ruby. There are two areas you are supposed to keep state in Elixir (specifically Agents or GenServers) and they aren't exactly beginner friendly topics. I was listening to an episode of The Elixir Fountain this morning and they were talking about moving to Elixir from Ruby and a lot of people find ways to hide state in their code when it shouldn't be there. They just haven't shifted from an OO mindset to a FP mindset. Recursion, Map, reduce, etc, are all concepts that can be harder to understand. It is easier to do a for loop in an OOP language than try to fit that into something like Elixir. It can be done but it gets messy fast when you are new and may not know the best way to do things. At the end of the day, I love Elixir and hope to get to write it professionally soon but despite being around for 6 years it isn't ready for the mainstream yet due to the issues above. TL;DR; Documentation isn't the best. Erlang syntax and lack of popularity make Elixir harder to discover. 3rd Party Library support is sparse. And the mindshift from OOP to FP takes time that many may not be willing to invest