4 ms·
It seems like a lot of companies are moving to Go for fast services. As a rails dev for 10+ years, I am looking at Go instead of Elixir and Phoenix, b/c Go is a
by itake 7y ago
It seems like a lot of companies are moving to Go for fast services. As a rails dev for 10+ years, I am looking at Go instead of Elixir and Phoenix, b/c Go is a much more popular language than Elixir.
- innocentoldguy 7y agoGo may be popular, but is also a lot less complete. Some other things to consider are that Go's concurrency model is quite bloated when compared to Elixir's, Go uses public memory for its goroutines vs. Elixir's private memory that protects processes, Go uses cooperative multitasking vs. Elixir's preemptive model, and Go's dependency handling is absolute rubbish. Elixir's process supervision is amazing and Elixir's pattern-matching allows you to write easier-to-read and more maintainable code, in my opinion. While both are good languages, I've personally found Elixir > Go.
- donatzsky 7y agoWhich would you say is easiest to learn, for someone with a little programming experience? I'm currently planning a SaaS project and had settled on go, but this discussion is making me wonder if perhaps Elixir is the better choice.
- innocentoldguy 7y agoI think the basics of Elixir are easier to learn. The syntax is pretty straight forward and you don't have to worry about much more than functions and modules. OPT, which is how you build supervision trees and other more complex Elixery things, is tricky at first but reading through Designing Elixir Systems with OTP, by James Edward Gray & Bruce A. Tate, and The Little Elixir & OTP Guidebook, by Benjamin Tan Wei Hao should clear it up fairly well. This is highly subjective, of course, but I've written code in C, C++, Pascal, Basic, Python, Perl, Ruby, JavaScript, Go, PHP, Java, C#, Clojure, Scheme, Cobol, and Pick Basic (of all things). Elixir has been my most favorite language so far.
- aczerepinski 7y agoI’ve invested a lot of time into both Go and Elixir. I like both languages a lot. My anecdotal view of the marketplace is that Elixir recruitment emails tend to come from startups looking for their 2nd or 3rd dev, usually full stack, and the salaries are nothing special. Go recruitment emails tend to come from bigger companies looking for backend devs, often hoping for kubernetes experience too, and the pay is higher. I built an internal service with LiveView at work and I loved it. I gave a presentation about how it all works and was hoping it would catch on. It didn’t. The front end team would probably mutiny if we told them to give up React and level up their LiveView skills. If I were running a web business as a solo founder I would 100% want to use LiveView. As a dev on a larger team that already has specialization it’s a tougher sell.
- leorio 7y agowhat would you say are the benefits of using LiveView over react?
- rvense 7y agoWith LiveView, you've got one code base. There's no frontend/backend split, so you don't think about the API, you don't worry about going back and forth between JSON and all the associated error handling, you don't worry about versioning and keeping deployments in sync when/if you break APIs. You shouldn't really compare it to React, you should compare it to your whole stack, and see how a lot of the code and the worries just kind of go away. This is much like how it used to be with classic server-side rendered Rails/PHP/Phoenix... except with LiveView you can update part of the page running on the client, in response to events coming from the client without a page refresh.
- aczerepinski 7y agoEliminating a bunch of API code.