by techiferous on 8/5/17, 12:58 PM with 96 comments
by bjz_ on 8/5/17, 2:23 PM
I've done a decent amount of Elixir in prod over the last year and a bit and I've found the lack of a decent, modern static type system pretty frustrating. I love the idea of failing fast, but most of the time we're throwing 500s from trivial developer mistakes (and yes, we do TDD). Lazily evaluated libraries like Streams or Ecto.Multi explode in weird, non-local ways because the types are not checked at the call-site, making refactoring and iterating a chore.
I have tried out Dialyzer, but it lacks many things you would expect from a modern type system (eg. parametric polymorphism). While experimenting with it I've been able to get it to accept trivially broken programs without complaint, which means I've never been really be sure it's got my back, so have given up on it. And yes, this is with the flags ratcheted to their highest settings. Not to mention all the third party libraries who forget to keep their typespecs up to date.
I realise designing a type system that can handle hot-reloading in a cluster is still an open problem (interesting work in progress on this front though), but most folks aren't really at the scale where that is a problem. They'd probably be far better served using a more traditional deployment process while getting the immediate benefits of the improved iteration speed, refactoring confidence, and data modelling that languages with modern type systems provide. The front end is beginning to 'get it' with the likes of Typescript, Flow, Elm, Reason, Purescript, etc, and I can only hope that their good work and excitement will eventually flow back to us on the back-end...
by tatersolid on 8/5/17, 1:36 PM
by whitepoplar on 8/5/17, 1:32 PM
by atombender on 8/5/17, 2:39 PM
I'm a big fan of Erlang and OTP, and really wish for that style of concurrency, failure tolerance and distributed computing. For me, the lack of static typing in Elixir struck me as a missed opportunity from the outset. The Ruby-like syntax isn't enough to change the game for me (I find it significantly less attractive than Ruby, but that's not important), even with macros.
Since I don't use Elixir, the above isn't necessarily a criticism of it -- I'm sure it's great. Just not for me.
Go is what I'm using now, and I've been playing with Rust and will probably start using that when I have a new project. I've been using Haskell for some side projects. I like OCaml a lot, but I won't touch it until multicore support lands and matures. For web projects, my plan is to transition everything from JavaScript to TypeScript, precisely for the type system.
No more dynamically types languages except for scripting.
by jesses on 8/5/17, 2:46 PM
That said, I built https://gigalixir.com to try and help with some of these issues and improve the deployment story for Elixir.
by Sailias on 8/5/17, 2:10 PM
Elixir has helped us reduce our costs by 1/3 and improve our API response times from 50ms to 5ms. (Ruby -> Elixir)
Using erlang/Elixir processes forced us to reevaluate the way we handle state and were able to find many ways to optimize.
I believe our code is now more organized, extensible and powerful. Our infrastructure is also more complicated, but much more fault tolerant as we have fallbacks for fetching data etc.
Deployment was pretty terrible but a simple scaleable solution with AWS is build with a docker container, push to ECS and launch ECS + ElasticBeanstalk and you're good to go.
by hawkice on 8/5/17, 1:36 PM
by aczerepinski on 8/5/17, 3:48 PM
However, I don't think anyone else was getting excited about Elixir, or more broadly about functional programming. When it came time to choose a stack for a much bigger project, Go won out. The only specific complaint about Elixir I'm aware of is that ramp up time would be too long every time we bring a new dev onto the project. In hindsight I don't think Go is any different in that regard. A Ruby/JS dev either needs to learn pattern matching, macros, list comprehensions, and a bit of OTP for Elixir, or they need to learn static typing, pointers, goroutines, and idiomatic error handling for Go.
Personally, I'm happy either way. I'd still probably choose Elixir if it were my choice to make, but I'm loving Go too.
by tmorton on 8/5/17, 2:03 PM
On many platforms, the best practice is to have stateless application servers, with separate stateful data stores. On the other hand, the big advantages of Erlang/Elixir are in managing state along with your application logic.
In a vacuum, that can be a big win. But I'm worried that the advantages are not enough to overcome the weight of tooling, services, and best practices built around the stateless model. For example, Heroku explicitly tells you to avoid application state, and Docker is built around a destroy-and-rebuild ethos.
For my project, Elixir/Phoenix is great as a "better Rails", but I know I'm only scratching the surface of the platform's strengths.
by albertgoeswoof on 8/5/17, 1:29 PM
by thesmallestcat on 8/5/17, 2:01 PM
by Rjevski on 8/5/17, 1:48 PM
by swat535 on 8/5/17, 3:10 PM
by andrenth on 8/5/17, 5:40 PM
by becga on 8/5/17, 2:32 PM
There are solutions out there,though documentation may not cover every use-case, especially if you are deploying to something like AWS or GCP (Not everyone can adopt Docker just yet).
The Hot-Upgrade is a great idea though you will have to do your research to integrate this with your Cloud Provider.
Overall I'm betting adoption will be niche, and primarily via Teams coming from Rails. Until a major cloud provider starts offering native support + the community grows to a sizable percentage, it will be slow to catch on.
by user5994461 on 8/5/17, 1:58 PM
It's already an issue with Erlang. It's made 10 times worse with Elixir.
by maxxxxx on 8/5/17, 1:55 PM
by qaq on 8/5/17, 1:31 PM
by DeepRote on 8/5/17, 1:34 PM
I am actually moving components of my apps away from erlang to f# to shield it from the destruction of beam that elixir will bring about.
2/10