-
Notifications
You must be signed in to change notification settings - Fork 109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Would you still pick Elixir in 2024? #102
Comments
Practical reasons why Elixir is a great choice:
|
Great write-up! The jobs thing might not be as dire as is looks though:
I can't remember exactly which it was in (I think it might have been this: https://www.youtube.com/watch?v=Tsg6V0UBlEw) but one of the sessions at Code Elixir 2018 in London was talking about the difference between the supply and demand of Elixir developers. The demand might only be a fraction of what it is for say Javascript developers, but the JS market is well and truly saturated. The supply of Elixir developers is a fraction of the demand, and that demand is growing at a faster pace than the supply. Looking at the situation purely as "there are only x Elixir jobs out there" isn't painting the full picture. The only point I would really disagree with is the list of suggested languages. When you talk about other choices being "considerably more difficult to learn", this definitely applies to Rust too. Of the various modern languages I have spent more than a few months with, I would say Rust is easily the ugliest. That said, I can't argue with the performance it offers and I would still add it to the list to fill a hole in their current skill set. When the OP already knows Java and Scala, I don't see as much value in adding Clojure to that stack versus something that doesn't run on JVM. Go I simply don't see offering enough unique advantages, and Haskell is a 'nice to learn' for purely academic reasons but I am yet to come across a scenario where I would ever choose Haskell over Elixir. It's just not as practical, accessible or just plan fun to work with. If I had to suggest a list, it would be:
and as a distant extra, possibly Elm. |
Well unless you want async (CSP), STM, lazy sequences and other features of Clojure that people love. I only know Scala devs who gave up on Scala because it is overly complicated and generally not worth the effort to learn. Clojure can be learn in few hours. |
Not a dig against Elixir, I'm just surprised to not see much mention of Ruby here. Ruby may not have the same functional basis (something I like about Elixir a lot) but many of the pros throughout this thread apply to Ruby as well. In fact if I'm not mistaken Ruby was influential on Elixir's syntax. I've even heard Elixir described as "Erlang with Ruby syntax", even though I know that's not technically correct obviously. Edit: I work with both Elixir and Ruby. I can say I personally like Rails more than Phoenix in many ways. Though it's mostly my love of ActiveRecord. I also still feel like it's easier to get Ruby to do what I want it to do (often described as a con), since it's so flexible. E.g. I can rip open the |
@nixpulvis good point. All of the "lessons learned" from
I used Rails a lot back in the day and found that it had way too much "magic" and arbitrarily named modules full of "inside jokes" that made it less beginner friendly ... Elixir still has some of that due to the overlap in communities but the code is much easier to follow through the stack. Anyone following along this thread who has not experienced Ruby, see:
To be clear I'm not "picking" on Ruby, it's still "good". |
@proyb6 no doubt and you wouldn't use it for your life-support system for your grandmother. 😉 Still, it's definitely "one to watch". Many people treat their programming skills as "work" and don't do any learning in their "off time". If I was only allowed to pick one language to write in 2019 I would pick Elixir hands down all day long.
|
Why the sudden spike of interest in this thread...? 🤔 @KristerV thanks for randomly submitting it. ❤️✅ |
This isn't really true anymore, and hasn't been for some time. Rust hit "stable" release a while ago, and has committed to avoiding breaking changes going forward as much as possible, at least within editions. I've been maintaining a small Rust tool since very nearly 1.0 and have yet to have to change anything for compatibility reasons. I would say though that this is less true still of much of the web ecosystem unfortunately, especially as my favorite choice of framework, Rocket, still requires nightly (though this is changing soon!). Perhaps this is what you mean by this? |
@jarcane thanks for clarifying. I haven't played with |
I picked Elixir in 2015 with Dave Tomas's Book, i had faith it is destined to be the new framework that will replace the flawed breaking MVC Pathways of rails, but meh.. that didn't happen. Since then i have moved to Clojure and found better and more composable ways to write code, with both very large and small companies both backing it. Clojure is destined to touch greatness in the long run. Elixir maybe not so. |
@metacritical Dave Thomas' Book "Programming Elixir ≥ 1.6" https://www.amazon.com/gp/product/B07DP8Y2GJ/ We have tried to make our notes in this repo beginner-friendly https://github.com/dwyl/learn-elixir I would urge anyone else reading this thread in 2019 to consider Start learning Ultimately, if people pick Clojure over Elixir that's cool. 🌈 “Indeed, the ratio of time spent reading versus writing is well over 10 to 1.
|
@nelsonic great points! I distinctly remember a professor back in college ranting about how code is meant for humans to read, the fact computers can execute it is mearly a side effect. |
True, but you should also give Elixir a try. It's very nice |
Stellar write-up. I've had a lot of success in selling Elixir to my current employer which is primarily a Ruby shop. I'm not really afraid of ugly syntax like some claim Erlang's to be, but some people are, and though that thinking to some may seem flawed, it's still a valid concern from the perspective of a project owner or chief technical role. Elixir's syntax helps alleviate those fears, and combined with its benchmarks, I've really found that it's not a tough sell. |
If you use TypeScript it's more easy. Also newest node adds
Crashes are extremely rare in node (and restarts on crashes are handled by deployment platforms) plus unhandled exceptions can be catched with
Nowadays JavaScript package ecosystem is rapidly stabilising and because we went through many iterations of tools, latest ones are pretty good. Compare it e.g. to ruby ecosystem where there was less change but latest versions of "preferred" packages are often first of their kind and poor quality.
It is far better than using prototypes back in the days and plays well with typescript. Classes don't need to be used as entities that encourage mutability, they can be used as simple typed containers of data, that also allow mutations if performance requires it (no copying). Matter of opinion.
Corporations like Microsoft, Google, AirBnb, Uber, Netflix are also prominent in JS ecosystem. For me personally it's not a problem, even it's an advantage because I know they have resources to support libraries and tools they've created practically forever. Don't get me wrong I really like Elixir and would love to use it instead of Ruby if it had mature enough package ecosystem. While it's great choice for API and servers, it's not replacement for Node (at least for web apps, you can't make universal app in it, see Next.js). I think this post could rather pick "Why Not Stick with Ruby?" topic instead. |
I couldn't help myself. This thing is very well written. I'm just starting out with Elixir and the official tutorial is very good apart from the fact that starting from GenServer stuff it had too much "how" and not enough "why" to the point of me forgetting why I wanted Elixir in the first place. Finding this very well written topic made me remember :) so thanks @nelsonic ;)
Hmm, I'm using Next.js and I prefer keeping front and back codebases separate anyway. My goal is to use Next.js in front and elixir in the back. I'm only starting with elixir, but can't really see why I can't write a full blown webserver with elixir. I do find myself thinking in the old mindset - maybe this is also why you think Node can't be replaced? The main thing I love about Node is the plain simple JSON support, but not exactly a show stopper.
Just to point out that while this comment HN is absolutely right, sometimes we need a personal experience (just like sometimes we need an opinionated framework) more than an in depth analysis. |
It's not about keeping backend (API) and front-end separate (which is fine), but SSR with combination of making a progressive web app. |
@sheerun could you elaborate what you mean by a progressive web app and why I can't have SSR if the backend is separate? |
As defined by https://developers.google.com/web/progressive-web-apps/ I never said you can't have both. I said that Elixir is not replacement for Node for web apps because of SSR, it can be only be used instead of Node when Node is used to serve API requests which is rarely the case: nowadays Node is mainly used for 1. writing universal libraries 2. writing apps and bundling them with webpack/parcel/etc for different targets like browsers or native apps |
Don't really want to hijack this topic so last question: I can still have Next.js and SSR in the frontend and Elixir serving the data in the back. So what is stopping me from writing a Fast, Reliable and Engaging frontend? |
Nothing. Again my point is that "Why Not Stick with JavaScript/Node.js?" is not valid question because nowadays Node.js is used mainly for things that Elixir isn't fit for. Elixir and Node don't compete with each other, they complete each other. |
I have been using it for quite some time and prior to that Erlang as well. :) |
Nice
… On Jan 7, 2019, at 10:17, Istvan ***@***.***> wrote:
When the OP already knows Java and Scala, I don't see any value in adding Clojure to that stack.
Well unless you want async (CSP), STM, lazy sequences and other features of Clojure that people love. I only know Scala devs who gave up on Scala because it is overly complicated and generally not worth the effort to learn. Clojure can be learn in few hours.
True, but you should also give Elixir a try. It's very nice
I have been using it for quite some time and prior to that Erlang as well. :)
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
LOL. I must say that since I've gotten into Elixir I haven't had this much fun programming since learning Ruby. The two are simply a joy to use but Elixir is quickly becoming even more fun. Additionally, I saw the ExUnit "dynamic" comments last week for the first time ( where the tests will fail if the examples in the comments are out of place!!! ) and I almost felt like I was in church. Hallelujah ! |
Elixir RAM and the Template of Doom: https://www.evanmiller.org/elixir-ram-and-the-template-of-doom.html (or "Why Elixir is So Much Faster at rendering templates than other languages) |
Hello, can anyone explain me why Elixir is not present in Tiobe index? |
@GGuinea good question. The Tiobe index is a general measure of popularity of programming languages based on Search Engine data and other "industry trends". Their ranking algorithm is not public/open and has received plenty of criticism in the past.
Human Language Comparison 💬Sadly, the "my language is better than your language" (playground debate) will never be settled. What is the Language useful for?You appear to know Polish2 🇵🇱 👋 The language is not very popular ... (this is a fallacious argument, but bare with me ...)
|
@nelsonic what a extensive response. Thank you for that! You are great person. Example with the human language is enormously pictorial. IMHO your answer should be somehow pinned. I hope many young developers will resolve his / her doubts. |
@nelsonic The offer sounds interesting :D |
@GGuinea indeed the Firezone offer is very interesting "If you’re not an Elixir/Phoenix or Erlang expert, that’s ok!
|
2022 StackOverflow Dev Survey:
|
In case you missed the discussion on HN yesterday: https://news.ycombinator.com/item?id=34530052 Ask HN: What would be your stack if you are building an MVP today?Top comment:
|
Official Announcement that A few good comments on HN: https://news.ycombinator.com/item?id=36576352 Very curious to see if this will accelerate or hinder Looks like the Type System will replace typespecs: (which make sense): I for one welcome this decision and look forward to seeing the implementation. 🎉 |
Elixir Saves Pinterest $2 Million a Year In Server Costs: https://paraxial.io/blog/elixir-savings Worth reading. 👌 |
May I push a grumpy or sarcastic, and a bit politically incorrect remark 🤓? Ok, so Elixir & Co is good for climate change, but no one understands or values this? My metrics are the amount and profile demand of job offers in Elixir. |
It's not that simple, I think. There are several corporations on the market that are imposing their technical stack. (Facebook - PHP, Google - Golang, Basecamp, Shopify, Github, etc. - Ruby on Rails, Twitter, Linkedin, Paypal, Uber, Netflix - Node.js, etc.). Including universities with their implementation of legacy Python for academic purposes. So the days when a few people could create a modern stack and make it popular are gone. Even if this stack is really reliable, fast, easy to code, and so on. You need a really big company behind. Which usually means it must be a totally new product on the market. Even Ruby wasn't popular until BaseCamp adopted it and created Ruby On Rails. Even then, it took years for the Ruby stack to become truly popular among startups. So, Elixir Phoenix is now Ruby On Rails as it was in the beginning. It has the same pros and cons - fewer developers, but these developers are usually experienced professionals. Just like in the Ruby days, you'll need to convince your boss to use the stack, but it's worth it for both the developers and the business. So yes, we are now in a time machine and seeing the Ruby On Rails stack hit the market. We have a front row seat - we can be really cool developers in this new stack, create plugins, start our own Elixir blogs, create Udemy tutorials, become an influence and become famous. Or we can still find a job in this stack and code happily :) There is no shame in riding the mainstream either. In the end, not everyone is passionate and ready to move something in the industry. Most people just work and earn money, to be able after 6 PM play games, watch a movie or drink a beer with friends. And they don't give a crap what stack to use or in what company they work or what product they create. |
I asked why Elixir/Phoenix isn't more popular on HackerNews a few days ago. That sparked quite a nice conversation which I think should be linked here :) https://news.ycombinator.com/item?id=37702845 |
I'm reading this thread and it's a great discussion. Long, but there are
several people with real world experience talking about the brass tacks in
a real practical way.
…On Fri, Oct 13, 2023 at 8:25 AM Markus Siering ***@***.***> wrote:
I asked why Elixir/Phoenix isn't more popular on HackerNews a few days
ago. That sparked quite a nice conversation which I think should be linked
here :) https://news.ycombinator.com/item?id=37702845
—
Reply to this email directly, view it on GitHub
<#102 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAHBTL6423AMIOTRT7KMFE3X7FFNDAVCNFSM4GI6353KU5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCNZWGE3DCMJZGI2Q>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
In case you missed it, this was top of HN for much of today: |
Should you learn Elixir in 2024? (Dreams of Code) |
This Ep of @t3dotgg has been on my "to watch" list for a few weeks. ⏳ 📺 Stoked to see Theo giving
Anyway, stoked that Theo is bullish on |
2024 numbers are in: https://survey.stackoverflow.co/2024/technology/#top-paying-technologies Most admired: https://survey.stackoverflow.co/2024/technology/#admired-and-desired
What can we infer from this?
What are your thoughts? ref: https://elixirforum.com/t/2024-stack-overflow-survey-results/65116 |
A friend of dwyl asked the following question in our "chat" system:
We feel it's worth capturing the reply in public because it's relevant to anyone considering Elixir.
Let's give the question a bit of context first:
The OP asking the question is a talented/experienced programmer who has worked as a programmer for 10+ years and already knows JavaScript, Java, Scala, Elixir (a basic app including GitHub OAuth). They are a "senior engineer" at their current day job and make a good living by both national and international standards. However from speaking to them extensively they don't enjoy their Job.
(this last part might not be relevant so you can ignore it, but just to say they do not work for @dwyl ... despite our best efforts to offer them a job!)
Which Programming Language Should We Use... ?
The question of "Which Programming Language" is one we ask ourselves fairly regularly, and is the reason that lead us to discover and decide on using
Elixir
in 2016. We periodically survey the "up-and-coming" languages like Kotlin, Julia, Lua, etc. and keep concluding that our choice of Elixir is the one we would make again right now. Elixir is the "full package" from idea to deployment!A good place to look for the trends is in the "Most Wanted" list of the StackOverflow Survey:
https://insights.stackoverflow.com/survey/2018
Sadly, for some reason SO decided to exclude Elixir from their list this year! But the last time they "allowed" it as one of the options is came out near the top:
Not that you should allow yourself to be "lead" by the crowd, but it's useful know the pulse of the wider developer community, especially when trying to make the case for a new language at "work" or deciding what to learn for yourself.
Why Not Stick with JavaScript/Node.js?
At the time we (our entire team/company/community) were deciding what to learn/use next
were all proficient in JavaScript/Node.js and had built many projects using the "Old Stack".
Our reasoning for "jumping ship" from Node.js to Elixir can be summarised by the following list:
class
. It's a horrible interface!see: https://medium.com/@Rewieer/javascript-the-bad-parts-and-how-to-avoid-them-1a7c9bc5a0dd
see:
They are all heavily biased toward React, GraphQL, etc. and as a result they are further perpetuating the use of these tools.
I don't like to think of @dwyl as having "competitors", but if I did, I would want them to use JS/Node.
Because it's an inferior experience to
Elixir
in every meaningful way.Why Elixir?
Our "medium term" plan @dwyl is to build IoT devices to control our home https://github.com/dwyl/home
for this Elixir is perfect there literally is no better platform for IoT than https://nerves-project.org
Along the way we are building a distributed/decentralised learning platform that will heavily feature real-time interaction. Again, Elixir is perfect for this; nothing else comes close!
We have built several "CRUD" and "REST API + Elm Frontend" apps for clients over the past 2 years and I can honestly say that I'm happy to maintain any one of those apps and I think anyone else "inheriting" the codebase will thank us for how the code is written, tested and documented.
Pros
Every good language has Macros.
see: https://github.com/mana-ethereum/ethereumex and https://github.com/fredwu/simple_bayes
Our "Real World" Experience
We have been using Elixir (almost exclusively) for the past 2 years for all our client and personal work.
I can say categorically that I prefer to write, read and maintain Elixir 10x more than any other language.
I return to Elixir code I wrote 18 months ago and I can immediately understand it and I don't feel the need to re-write any of it because it "just works".
Phoenix has been a joy to use for the projects we have worked on and because it's the de facto standard in the Elixir community, I'm confident that any code we have written is maintainable by anyone else with Phoenix experience. i.e. it's easy to "onboard" people into a Phoenix project because everything is where you expect it to be.
We are very pleased with the development in the Phoenix framework over the past few years
and Phoenix LiveView is going to be absolutely game changing! see: dwyl/technology-stack#68
When new versions of Phoenix have been released the upgrade process has been painless.
see: dwyl/learn-phoenix#118
The attention to detail in the Phoenix changelog / release notes makes it easy to upgrade.
I have zero regrets in adopting elixir for our client work and my personal projects.
If anything I wish I could go back in time and tell my 2012-self to "drop" Node.js sooner!
I regret trying to use a spoon to dig a swimming pool; pick the "right" tool and let the BEAM do the work!!
"Cons"?
Map
and there are excellent libraries for doing this. This is "fine" because it's fast, but I would prefer it if JSON was natively supported in Elixir so that I could copy-paste JSON data from JS-land directly into code/tests and just run it.This is rapidly disappearing as a "reason" to not adopt Elixir. The community is growing fast and there are even people on "Upwork" who list Elixir as experience/preference.
But if you prefer to work for open minded companies with good tech and learning culture,
then Elixir is good filter/signal of a place you want to work.
Use Case: REST API ... ?
A REST API is something you generally build for other people (developers/companies) to "consume". (unless you are building "microservices" for internal consumption ... useful to clarify!)
The main goals of a REST API are to make it easy to understand and "consume" reliable to run.
If your use case is a simple REST API, I would recommend you just use what you (already) know.
If you know JS, use Express. If you know Java use
light-rest-4j
if you know PHP use Laravel. If already are familiar with Elixir, use maru it's lightweight and robust.In many situations, the choice of programming language is less important than the "deployment" of the resulting application. If work somewhere "traditional" where the "DevOps" people are not ready to support an Elixir App, then the question of "which programming language" is moot.
The biggest question anyone considering Elixir needs to ask is: do other people in my team/company want to try something different? i.e. will "Negative Nancy" shoot it down? and will "DevOps" support it?
If you work somewhere that does not have a kaizen learning culture, fuhgeddaboudit.
If you are lucky enough to work somewhere that is open minded about tech, find a way to show your "boss" or peers that Elixir is an excellent choice for anything "real time" and "high reliability".
Conclusion
These are the languages I would recommend to anyone in the OP's position in order:
Elixir
- because it's a "friendly" way to leverage all of the real-time power of BEAM. It has excellent tooling, property-based testing, deployment, monitoring and tracing.Rust
- a close second to Elixir. Great for systems programming and building cross-platform apps, but expect "breaking changes" as still being actively developed (whereas Elixir is far more "stable").Go
- Is the choice if you need to "sell it" to a "Boss". The fact that it's "sponsored" by Google and has full support on App Engine, GCF, and now AWS Lambda are major plusses. We don't use it because it's more verbose than Elixir, is more difficult to write real-time code and has an imperative programming style, which we find leads to more complexity.Haskell
- The obvious choice if "purity" of your functions is a high consideration, but nowhere near as "fast" as Elixir and considerably more difficult to learn. Most companies are "afraid" of Haskell. The ones who have embraced it wouldn't use anything else!Clojure
- If you work somewhere with a lot of JVM code, this will be easiest to adopt.Python
- if you don't care about the infrastructure/server costs and just want an "easy life" as a developer. e.g. you don't need anything "real time" and just want RESTful "CRUD", use Django on Google Cloud: https://cloud.google.com/python/djangoNext?
If you are reading this wondering what to do/learn next, we have created several beginner friendly tutorials that take you from zero to fully functional App:
The text was updated successfully, but these errors were encountered: