Skip to content
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 2021? #102

Open
nelsonic opened this issue Dec 7, 2018 · 63 comments
Open

Would you still pick Elixir in 2021? #102

nelsonic opened this issue Dec 7, 2018 · 63 comments

Comments

@nelsonic
Copy link
Member

@nelsonic nelsonic commented Dec 7, 2018

A friend of dwyl asked the following question in our "chat" system:

question-using-elixir-rest-api

We feel it's worth capturing the reply in public because it's relevant to anyone considering Elixir.

"Hi guys, sorry for bothering, but I need your help/input with something
I know that you have been working with Elixir now for a while
So I want to ask you guys on your thoughts about it now after doing some real work with it
The pro's, the con's
would you use it for rest api etc"

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:
image

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:

  • Node.js Error Handling 😢 ... if you've ever had to debug a production bug in Node.js you will know what I'm talking about. On large Node.js projects finding the source of a bug is an expedition! And since Node is a single-threaded event loop, if the process crashes for one user, it crashes for all the requests being handled by that process. i.e. one user can crash the server for hundreds/thousands of people! This is a terrible design flaw (that I used to think was a "feature"...) it's "OK" on AWS Lambda where every request spawns a new process, but most Node.js is not being run on Lambda!
  • JavaScript Fatigue 😫 there is a new library/framework vying for attention every week! it's exhausting! As a developer I just want to get on with my work, not have to read another Hackernoon post on how everything from last week is obsolete because XYZ framework "changes everything" (for no good reason!). Note: I love learning new things. just not re-learning in the same thing each time there is a "new" way of re-writing a function! JS did not need class. It's a horrible interface!
    see: https://medium.com/@Rewieer/javascript-the-bad-parts-and-how-to-avoid-them-1a7c9bc5a0dd
  • Everyone thinks they can write JS code, few take the time to learn how to write maintainable JS.
  • Facebook trying to "own" the JS ecosystem ... 😡
    • The "State of JS" https://stateofjs.com is created/maintained by people who use Fb's JS "stack".
      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

  • Elixir is easy and fast to learn. Most people can achieve proficiency in less than a week (focussed).
  • The language is beautifully designed for readability by one super smart "BDFL" who does "real work"; not just work in academia dreaming up esoteric language constructs. There are no "Norman Doors" in Elixir.
  • Elixir Macros are a super slick way of encapsulating and re-using functionality.
    Every good language has Macros.
  • Testing code is much nicer in Elixir than anything else. ExUnit is "baked in" and Property-based Testing is easy see: #93 This makes "real life" of a developer much better because writing tests is faster and the QA/PO can have high confidence in the code!
  • BEAM is an incredible VM that runs seamlessly on any hardware/infrastructure.
  • Error handling when things "break" is second to none. I would want my life support system to be built with Elixir. I intend to control my house, food and water with Elixir!
  • There are many awesome projects in the ecosystem: https://github.com/h4cc/awesome-elixir which makes it easy to get "inspiration" and find solutions to common problems.
  • People are using Elixir for Blockchain/Smart Contract apps and even Machine Learning.
    see: https://github.com/mana-ethereum/ethereumex and https://github.com/fredwu/simple_bayes
  • Elixir is "coming soon" to AWS Lambda: dwyl/learn-aws-lambda#112 when this happens there will no longer be any reason for us to use Node.js I cannot wait!

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-framework#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"?

  • No "native" type for JSON data. You always have to parse JSON into a 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.
  • Relatively difficult to "recruit" developers with existing experience in Elixir (compared to Java/JS)
    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.
  • Management (at "big" companies) who don't (want to) understand functional programming or the concept of people enjoying their work, will never see the point of Elixir.
  • Fewer Jobs you can apply for as a Dev. This is just a fact you have to deal with.
    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.

There are hundreds of companies you can apply to work for.
see: elixir-companies and Jobs: http://plataformatec.com.br/elixir-radar/jobs
even McKinsey & Co are using Elixir!! (I got a DM from someone trying to recruit me...!)
Anywhere that uses Ruby is a strong candidate for Elixir. Expect the adoption of Elixir to accelerate in the next few years. Whenever you read a job for "Ruby-on-Rails" you can basically apply for it and ask them: "do you want to save 90% of your server costs, add real-time features to your app and transform your recruiting?"

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.

I feel the OP's_focus_ on "REST API" might not give us a full picture of what their end-goal is for the question ... are they re-writing an existing REST API to a new language/framework for better maintainability and performance? or create a brand new REST API from scratch?

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:

  1. 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.
  2. 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").
  3. 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.
  4. 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!
  5. Clojure - If you work somewhere with a lot of JVM code, this will be easiest to adopt.
  6. 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/django
  7. Are you still reading this? Start learning Elixir!!

Next?

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:

@nelsonic
Copy link
Member Author

@nelsonic nelsonic commented Dec 7, 2018

Practical reasons why Elixir is a great choice:

  • Pattern matching means you write less code and almost no "if" statements. code is more expressive and readable.
  • Pipeline operator means your code flows logically and there are is less "control flow" noise.
  • First-class Documentation with ExDoc and inline doc testing means code comments don't go "stale".
  • Ecto makes dealing with any kind of data a breeze, e.g. user input validation/sanitisation, etc.
  • Package management is excellent. Hex.pm is simpler, faster and easier to use than any other package manager we've used. Private packages can be loaded via Git.
  • Testing and testability is excellent. Coverage works well so it's easy to spot un-tested code.
  • Any feature you can think of has been implemented, google it and you'll find the solution.
    Seriously scroll through https://github.com/h4cc/awesome-elixir and be amazed!
  • Memory efficiency is much better than most other languages (with the exception of Rust, but Elixir is miles better at Error handling than Rust, which is a more practical feature IMO.) Lightweight BEAM processes are amazing.
  • iex (the interactive shell) is fast, has code completion and great error messages that teach you how to write better code!
  • Compilation is fast and incremental. Much faster than other compiled languages!
  • Zero Downtime "Hot" Deployment is really easy and fast. It's only a few lines of code to run an incremental release that automatically manages live connections! This is a feature people pay real money for! You get it for free in Elixir/Erlang!
@nathanchere
Copy link

@nathanchere nathanchere commented Jan 4, 2019

Great write-up! The jobs thing might not be as dire as is looks though:

Fewer Jobs you can apply for as a Dev. This is just a fact you have to deal with.
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.

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:

  • continue to focus on Elixir
  • one of Julia, Rust or Nim (in that order of preference)
  • Python

and as a distant extra, possibly Elm.

@l1x
Copy link

@l1x l1x commented Jan 6, 2019

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.

@nixpulvis
Copy link

@nixpulvis nixpulvis commented Jan 6, 2019

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 String class and just start adding methods (please be careful, and don't do this). The biggest pro of Elixir in my book is the functional nature of the language. You don't need to sell me on all the benifits (I have a λ tattoo ffs). Oh and pattern matching, something I also love about Rust.

@nelsonic
Copy link
Member Author

@nelsonic nelsonic commented Jan 6, 2019

@nixpulvis good point. Ruby is the spiritual grandfather of Elixir in both in terms of syntax and ecosystem. Ruby is still widely used in industry and is the "go to" language for many people.
I just would not recommend that people who don't know it start with Ruby as Elixir is objectively "better" in every way (system efficiency, error handling, testing, pipeline elegance, metaprogramming, BEAM, etc...);

All of the "lessons learned" from Ruby have been applied to Elixir (including the good parts of Active Record) and the result is fantastic. Phoenix has fewer "bells and whistles" than Rails, but I personally like that because I can sit down and read all the code in the Phoenix framework in a day whereas it took me a week to read the Rails core code back in the day.
(I printed it out and read it all...! Yes, I'm a freak!)

Ruby on Rails is still immensely popular and actively being taught in several coding bootcamps precisely because it is still used in many companies, but developers who are just getting started
wanting to "leapfrog" their peers, they should stick with the list above.
Ruby would be the 8th or 9th language I would recommend to someone
after JavaScript simply because the proliferation of Node.js and Front-end frameworks.

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".
Just that I lost a lot of time writing/debugging it.
And if I can save someone else the heartache by encouraging them to use Elixir, I will. 👍

@nelsonic
Copy link
Member Author

@nelsonic nelsonic commented Jan 6, 2019

@proyb6 no doubt Crystal is very promising.
Though I'm sure you'll agree it is still under heavy development v0.27.0 i.e: expect breaking changes!
image

and you wouldn't use it for your life-support system for your grandmother. 😉

Still, it's definitely "one to watch".
Perhaps we need an expanded list of languages. 🤔 (especially for people with time to "play")
The only reasoning for having an abbreviated list is to help people focus (avoid distraction ...)
Crystal-lang is classic Shiny Object Syndrome ...

Many people treat their programming skills as "work" and don't do any learning in their "off time".
Those people need to be more selective with the languages they chose to learn and master.

If I was only allowed to pick one language to write in 2019 I would pick Elixir hands down all day long.
But it's because I know what I'm building this year and it's heavy on the IOT ...

I expect to have 20+ Raspberry PIs running in @home controlling everything from the lights to the physical access security, security cameras and plant watering .
Python would be my second choice for this because it's easy to write and there are lots of good tutorials, but the "zero-downtime hot" deployment story in Elixir is much better and I need systems that I don't need to manually reboot if (when) they crash.

@nelsonic
Copy link
Member Author

@nelsonic nelsonic commented Jan 6, 2019

Why the sudden spike of interest in this thread...? 🤔
Yep, 3rd spot on Hacker News: https://news.ycombinator.com/item?id=18838115 😮
image

@KristerV thanks for randomly submitting it. ❤️

@jarcane
Copy link

@jarcane jarcane commented Jan 6, 2019

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").

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?

@nelsonic
Copy link
Member Author

@nelsonic nelsonic commented Jan 6, 2019

@jarcane thanks for clarifying. I haven't played with Rust in about 6 months.
I'm stoked that Rust is gaining traction and Rocket is a legit web framework. 🚀
If I was still a "gun for hire" (contractor) programmer I would definitely cultivate Rust skills. 🦄
Anyone following along, read this post: https://www.figma.com/blog/rust-in-production-at-figma

@metacritical
Copy link

@metacritical metacritical commented Jan 6, 2019

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.

@nelsonic
Copy link
Member Author

@nelsonic nelsonic commented Jan 6, 2019

@metacritical Clojure is a great language + community and an "easy sell" to teams/companies who already use the JVM. Obviously it's unfortunate that you did not feel Elixir was "for you" after trying it in 2015. 😞 (all I can say is that Elixir is much better now...!)

Dave Thomas' Book "Programming Elixir ≥ 1.6" https://www.amazon.com/gp/product/B07DP8Y2GJ/
is not designed for beginners as indicated by the graphic on the back of the book:
image
it should warn people not to use it as their first elixir book;
it's more of a "manual" than a step-by-step guide ... 🙄
I agree with you that it's not the best way to approach learning the language
and there is a bit of a "gap" in the market for an "Elixir for Complete Beginners" Book/Tutorial/Video Series that makes zero assumptions of previous knowledge/skill.

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 Elixir
as it has a fantastic UX and community from a dev perspective.

Start learning Elixir using this repo. https://github.com/dwyl/learn-elixir
if/when you get "stuck" open an issue with a question: https://github.com/dwyl/learn-elixir/issues
The @dwyl community love helping people who are stuck and we usually reply within a few hours.
Cross-post your question on the Elixir Forum: https://elixirforum.com
and StackOverflow: https://stackoverflow.com/questions/tagged/elixir which has several thousand answers and where "Dogbert" https://stackoverflow.com/users/320615/dogbert will usually answer in a few hours.

Ultimately, if people pick Clojure over Elixir that's cool. 🌈
I'm just stoked that Functional languages are gaining traction
because functional code is much easier to maintain
(from experience of writing and having to maintain lots of OOP code...)
and that's ultimately what we do as programmers; we maintain code and attempt to extend it ...

Indeed, the ratio of time spent reading versus writing is well over 10 to 1.
We are constantly reading old code as part of the effort to write new code. ...[Therefore,] making it easy to read makes it easier to write
.”
~ Robert C. Martin, Clean Code: A Handbook of Agile Software Craftsmanship

We spend a lot more time reading other people's code than writing our own.
The more readable the code is the better everyone's lives will be.

I wish there was an objective way of testing code readability with complete beginners
to compare the "beginner friendliness" ... 🤔

These two XKCD comics eloquently describe my experience of Java:

https://xkcd.com/1084/
image

https://xkcd.com/979/
image

Each day I wake up and don't have to read/write Java I'm grateful for my life choices and those of the many much better programmers than me who have paved the way to a functional future! 😉

@nixpulvis
Copy link

@nixpulvis nixpulvis commented Jan 6, 2019

@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.

@smorin
Copy link

@smorin smorin commented Jan 6, 2019

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

@willricketts
Copy link

@willricketts willricketts commented Jan 6, 2019

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.

@sheerun
Copy link

@sheerun sheerun commented Jan 7, 2019

On large Node.js projects finding the source of a bug is an expedition!

If you use TypeScript it's more easy. Also newest node adds --async-stack-traces

And since Node is a single-threaded event loop, if the process crashes for one user, it crashes for all the requests being handled by that process.

Crashes are extremely rare in node (and restarts on crashes are handled by deployment platforms) plus unhandled exceptions can be catched with process.on('uncaughtException') which is also automatic e.g. if you use @sentry/node.

JavaScript Fatigue 😫 there is a new library/framework vying for attention every week! (...). Hackernoon post on how everything from last week is obsolete because XYZ framework "changes everything" (for no good reason!).

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.

JS did not need class. It's a horrible interface!

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.

Facebook trying to "own" the JS ecosystem

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.

@KristerV
Copy link

@KristerV KristerV commented Jan 7, 2019

@KristerV thanks for randomly submitting it.

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 ;)

you can't make universal app in it, see Next.js

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.

the post is filled with a lot of claims with no reasoning to back those up

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.

@sheerun
Copy link

@sheerun sheerun commented Jan 7, 2019

Hmm, I'm using Next.js and I prefer keeping front and back codebases separate anyway.

It's not about keeping backend (API) and front-end separate (which is fine), but SSR with combination of making a progressive web app.

@KristerV
Copy link

@KristerV KristerV commented Jan 7, 2019

@sheerun could you elaborate what you mean by a progressive web app and why I can't have SSR if the backend is separate?

@sheerun
Copy link

@sheerun sheerun commented Jan 7, 2019

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

@KristerV
Copy link

@KristerV KristerV commented Jan 7, 2019

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?

@sheerun
Copy link

@sheerun sheerun commented Jan 7, 2019

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.

@l1x
Copy link

@l1x l1x commented Jan 7, 2019

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. :)

@smorin
Copy link

@smorin smorin commented Jan 7, 2019

@Nmuta
Copy link

@Nmuta Nmuta commented Jan 10, 2019

'Management (at "big" companies) who don't (want to) understand functional programming or the concept of people enjoying their work, will never see the point of Elixir.'

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 !

@nelsonic
Copy link
Member Author

@nelsonic nelsonic commented Jan 22, 2019

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)

@nelsonic
Copy link
Member Author

@nelsonic nelsonic commented Jul 5, 2019

This is a good post on the topic of “Why Elixir?”:
http://underjord.io/why-am-i-interested-in-elixir.html
HN thread: https://news.ycombinator.com/item?id=20357055

@mvelebit
Copy link

@mvelebit mvelebit commented Jul 18, 2019

I'd just like to add the StackOverflow survey for 2019, which states that Elixir is among the top 25 most popular languages, the 8th most loved language and the 5th language when it comes to salaries (which, I doubt could be attributed to the scarcity when it comes to the number of devs now). Just my 2 cents.

@jolee11
Copy link

@jolee11 jolee11 commented Oct 25, 2019

I am using Bash, C, C++, Objective C, Java, Python, PHP, Javascript and Elixir. But my true dreamy lover is Elixir with Phoenix framework. I pick Elixir in 2019 and I will pick Elixir in 2020, 2021, 2022, ...

@nikunjy
Copy link

@nikunjy nikunjy commented Mar 26, 2020

Number of battle tested frameworks, libraries and projects are probably one of the cons of Elixir.
With python, java, and golang that is not the case because of the high rate of adoption.

@nelsonic
Copy link
Member Author

@nelsonic nelsonic commented Mar 27, 2020

@nikunjy out of curiosity, how did you discover this thread? 💭

You are clearly a very competent/accomplished developer and you mean well by your comment,
but the argument that other languages have more libraries/frameworks/users than Elixir is really no longer relevant to someone deciding to use Elixir in 2020. Every feature you could possibly want is available in Elixir right now. The ecosystem does not need to have millions of redundant libraries competing for attention. It needs one library that solves the problem with the least effort, lowest maintenance and great performance.

Yes, Python, Java, JavaScript, Go, C# (etc.) have higher adoption rates.
This is inevitable as they are either used in Universities/Colleges or heavily promoted by big companies.
The popularity of Python or JavaScript will not decline, that has been noted above.

Many Good Frameworks/Libraries vs. One Great Framework

It's remarkable how the Elixir community has focussed its effort on building a single amazing framework. If you want to build a Web App/API with effortless highly scalable WebSocket support, Phoenix.

image

Phoenix really delivers on the promise of "productivity". We have seen complete beginners start contributing to a Phoenix project within a day of learning with no prior Elixir experience. We've seen experienced Java developers take days just to get a (similarly sized) project running on their laptop.

I would counter-argue that having too many frameworks/libraries causes confusion and indecision. In Elixir land there isn't even a question of "which framework to use", people just get on with building their App/Service and ship the product.

How Many Packages is "Enough"?

At present Node.js has 1.34 million packages and Golang has even more at 1,82 million!
too-many-packages

In both cases these ecosystems have way too many packages which leads to decision fatigue.
I have never taken more than a minute to find a library in Elixir or Erlang, the ecosystem is mature and robust. If anything it's "under the radar" which means there is less noise. There are many companies using Elixir including Brex but that should not matter in people's decision to use the language.

Hex.pm (Elixir package system) has 9.79K Packages at the time of writing.
That is a similar order of magnitude to Pub the ecosystem for dartlang (11.5K Packages).
You don't see/hear anyone talking about the lack of packages for building Native apps with Flutter ...
In fact Dart/Flutter is the fastest growing language/framework combo on GitHub right now.
Hence the consideration for using it in our cross platform native app: dwyl/technology-stack#81 💭
The lack of packages/frameworks/developers is simply not an issue.

OTP 🌈 🦄 🍦

People should consider Elixir for one reason: OTP.
("One Trick Pony" where the "pony" is a Unicorn and the "trick" is unlimited rainbow flavoured ice-cream):

image

OTP makes highly reliable distributed software easy to reason about and build.

Elixir is perfect for our use case: Real Time apps with Presence; no other language comes close to this level of simplicity for managing communication between millions of connected users. Trust me I have tried doing WebSockets in all the languages you have mentioned and a few others and they were all a headache.

Community

The thing that I love about Elixir beyond Channels, LiveView and Nerves is the community!

These last few days I've been busy learning how to use Phoenix LiveView.
See: https://github.com/dwyl/phoenix-liveview-counter-tutorial
But I got stuck on trying to write a test something ... So I opened a question on the Elixir Forum:
https://elixirforum.com/t/how-to-test-handle-info-2-in-phoenix-liveview/30070 Sure enough a few minutes later the creator of Phoenix answered my question with a clear and concise solution.

🤯

How many times have you been learning a concept in Go or Java and had one of the creators or core maintainers of the language take time out of their day to answer your noob question? 💭

Yes, other programming languages have good community, that's not in question,
however the original premise of the comment above is the "cons of Elixir".
I suggest that in addition to a complete set of libraries and an excellent framework, Elixir has a superb community of incredibly helpful people who take time out of their busy schedules to help beginners. If is anyone is any doubt as to adopting Elixir this is the deal clincher (IMO).

Try Elixir Today!

If you haven't tried Elixir I suggest you take a look at: https://github.com/dwyl/phoenix-chat-example
at the very least you will be able to say that you tried a different programming paradigm (functional).
And if you consider yourself a "full stack" developer, try building something with a reactive frontend without needing a JavaScript framework! see: https://github.com/dwyl/phoenix-liveview-counter-tutorial

Happy Elixiring in 2020 Everyone! 🚀

@nelsonic nelsonic changed the title Would you still pick Elixir in 2019? Would you still pick Elixir in 2020? Mar 27, 2020
@nikunjy
Copy link

@nikunjy nikunjy commented Mar 27, 2020

Hey @nelsonic
I use Elixir at my work. I was researching opinions about different languages and while doing that for Elixir I landed here.

Libraries

It is not about number of packages. It almost doesn't matter if Go has 2 million packages that only shows that people are excited about writing golang.

I am talking about packages:

  1. That have enterprise support
  2. Or are open-sourced, followed and used by thousands of people.

JS, Go, Java.. have both kinds of packages. Pick any SaaS provider they almost invariably write libraries for those languages supported.

For most of open sourced technologies you will observe that there thousands of followers and users of a repository. This leads to a very high number of issues being opened and talked about and in turn leads to a robust library.

Community

GIthub followers, Slack channels, even Reddit :D
The sheer massive number of articles is huge in other languages.

🤯

Noob questions are generally answerable by the numerous articles that have been published.


At the end of the day, I write Elixir and previously I used to write golang and before that C++

It is something that is my observation, and at the same time, it is in my vested interest as things get better and I will hopefully be contributing positively in that direction. But it is not a solved problem yet.

@Shoroh
Copy link

@Shoroh Shoroh commented Jul 16, 2020

You guys, are all experienced developers, have other languages in the past, and years of work. It's easy for you to switch to any new stack and find a job with it. Like Elixir/Phoenix.

But let's consider the backside of it. We see a lot of JS, Ruby, PHP (etc) junior vacancies, and almost ZERO of them for Elixir stack. Every "Elixir" company demands a senior developer. That is a real obstacle to make Elixir popular. Only a few experienced developers decide to change the stack at the peak of their experience and try Elixir. When a lot of beginners even don't try because of a lack of junior positions around.

Even me, with 5 years of Ruby experience and zero at Elixir, can't find an Elixir job outside of the US. They all say "come later, after at least a year of real work".

So, probably the companies, who adopted the stack, should reconsider this practice if they want to have more Elixir developers in the future :)

Would be nice to public such vacancies somewhere if they exist.

@nelsonic
Copy link
Member Author

@nelsonic nelsonic commented Jul 16, 2020

@Shoroh the "beginners" perspective is the one we most consider. 💭
That's why we painstakingly write beginner-focussed tutorials for Elixir, Phoenix, LiveView, Nerves, Scenic, etc.
And it's why we started this thread back in 2018 to encourage everyone to learn & embrace Elixir.

Yes, the people in this thread have - for the most part - used several programming languages which gives us a basis for comparison between them. It means we have surveyed more languages and concluded that Elixir is the one we want to use because it has exactly the features we need and a delightful syntax.

We hear you.
It can certainly feel like there aren’t any jobs in Elixir especially recently because of the Covid-19 Layoffs.
https://www.visualcapitalist.com/layoffs-prominent-startups-covid-19 😞
covid19-layoffs
Given that fewer companies are hiring in general and there are more developers unemployed, it's a double-whammy.
It's not pretty. And sadly, it's not going to get better in the next few months. The knock-on effect of the reduced demand in key sectors of the economy (tourism, transport, restaurants, co-working, etc.) will result in a reverse-multiplier effect. I don't want to sound "negative" in an otherwise positive thread, but everyone should hunker down because the economy is not going to "recover" until there is a widely deployed vaccine. Don't expect to find the "perfect" job in the next 18 months. Take the one that fits your needs (paying bills) in the short run even if it's not Elixir. If you already have a job, work diligently to keep it.

The Upside of the Post-pandemic World > Remote Working is Mainstream

The tragedy of both direct and indirect suffering as a result of the Covid19 Pandemic should not be understated.
But we must all move forward and focus on the future; remote work used to be the exception, now it's the norm.

For those of us who don't live in a major Technology Hub (San Fransisco / Silicon Valley, New York, London, Paris, Berlin, Shenzhen, Tokyo, etc.) it opens up considerably more options for companies we can apply to work for because they already acclimated to remote working.

The potential downside of more companies doing remote work is the potential for a "race to the bottom".
If this happens it will affect every "knowledge worker" not just Developers. We just know the outcome yet. 🤷‍♂️

Junior Elixir Jobs

Let's dispel the myth that there are no "junior" developer positions available.
For you or anyone else reading this in the future, broaden your search to include more job sites.
Keep searching and maintain your flexibility. Don't expect the job to only involve Elixir,
it's far more likely that it will be a job will be for a "Polyglot" Developer.
But that's OK, because there aren't many people who learn Elixir as their first programming language,
so almost by definition people who know Elixir know multiple languages.

This article is a good starting point: https://dev.to/study_web_dev/where-to-find-remote-developer-jobs-5g0h
Read the comments for even more options. Remember: it's a starting point, not the end.

There are quite a few sites that list Elixir Jobs. (I haven't done an exhaustive search if you know more, please share!)
e.g: https://elixir-radar.com/jobs | https://elixirjobs.net | https://elixir.career | https://remoteok.io/remote-elixir-jobs

image

image

LinkedIn has a few: https://www.linkedin.com/jobs/search/?currentJobId=1834181744&keywords=elixir
image

StackOverflow has a few Elixir jobs: https://stackoverflow.com/jobs?tl=elixir
stackoverflow-elixir-jobs-mindvalley

Even UpWork has a few jobs for Elixir: https://www.upwork.com/freelance-jobs/elixir
But I hear that can be a bit "hit and miss".

At the time of writing, there are a 22 remote-friendly or fully remote jobs with "Junior" in the title across the sites that list Elixir Jobs. Granted this isn't thousands like you would see in PHP but it's definitely not "ZERO".
And I'm sure that if I really needed to find a job I would be able to uncover many more just by reaching out to companies that use Elixir. There are currently over 500 companies listed on https://elixir-companies.com/en/companies
many of these will have jobs/roles that they have not publicised. Try to think of it as a "treasure hunt".
image

I would argue that searching for the "Junior" keyword is never going to reflect the reality because most companies will not put that word anywhere in their job listing even if they don't mind having someone with less experience.

Q: What can I do to maximise my chance of getting an Elixir Job?

  1. Write some Elixir code in public, e.g. on your GitHub. Even if it's only basic stuff, it's better than nothing.
  2. Write a tutorial for something you learned so you demonstrate sharing your knowledge. Showing others that you can communicate is essential in remote work. Practice your writing it's your superpower!
  3. Read all the online learning materials you can find there's a lot for free, learn everything! If you can afford to pay for the books, buy and read them all. Become an expert by absorbing the knowledge it has taken others decades to acquire!
  4. Add Elixir to your LinkedIn, Twitter, GitHub profile and anywhere you can think of.
  5. Add yourself to "For hire" on Elixir Companies: https://elixir-companies.com/en/for_hire and other job sites.
  6. Get involved in the Elixir community, start with https://elixirforum.com and stackoverflow.com aim to answer at least one question per day even if it takes you hours to research it, it's the fastest way to learn.

Then, after you have updated all your online profiles to include Elixir,

  1. Reach out to companies using Elixir and briefly explain how you discovered them and what you can do for them. Gmail has a daily limit of 500 emails. Use them wisely. Be brief and specific.
  2. Follow up if you don't hear back, send another email. Be polite but persistent.

Most companies have too much work and not enough people to get the work done. If you are prepared to help offload tasks that nobody has time to do like writing docs, tests or other technical debt reduction, you will always be welcome.
Emphasise that you work well alone and as part of a team. You learn fast and ask relevant questions when you don't understand what to do. You don't sit around waiting when you have finished your work, you proactively find the next task that needs to be done even if it's something you don't enjoy doing like writing automated UI tests. 😉

Always remember:

"Nothing will work unless you do." ~ Maya Angelou

@nelsonic
Copy link
Member Author

@nelsonic nelsonic commented Aug 10, 2020

@elgalu thank you for your interest in this thread and for sharing this misleading graph. 👍

I can't tell if you're just trolling :trollface: or if you are genuinely interested in understanding the reason why there are fewer Elixir and Phoenix questions being posted on StackOverflow than there are for Rust. 🤷‍♂️

Throwing in Next.js is a bit of a Red Herring, what has a front-end framework got to do with two backend programming languages and a server-side rendered web framework?

If you really wanted to show a contrast, why not compare it to Flutter?

https://insights.stackoverflow.com/trends?tags=next.js%2Cflutter%2Crust%2Celixir

image

Everything else seems pretty "flat" when compared to Flutter, right?

And what about the most popular programming language in the world by far, JavaScrpt:
https://insights.stackoverflow.com/trends?tags=javascript
image

What happened in 2016? Did the popularity of JavaScript suddenly decline?
Are there fewer Apps using JavaScript in 2020 than there were in 2016?
Obviously not! And yet this "Trend" would suggest there was a "dip". 📉
All this graph is telling us is that there are fewer questions being asked on StackOverflow.
The actual number of people and applications using JavaScript has accelerated.

As a "Senior Machine Learning Platform Engineer" you must know quite a lot about statistical models.
And you also know how easy it is to lie with statistics: https://youtu.be/bVG2OQp6jEQ
Especially when there is a hidden agenda that is being pushed. 🙄

A Single Graph Doesn't Tell The Whole Story

The Google Trends graph for Covid19 shows a steep decline since the peak on March 22nd:
https://trends.google.com/trends/explore?q=covid19&geo=US
image

What can we infer from this data?
Does is mean that the virus is no longer spreading as fast in the USA?
Nope. The infection rate is still accelerating: https://covid19.who.int
image

If someone just pasted the Google Trends graph, people could think that the situation is "under control", right?
But it's not though, is it...?

The point is the Google Trend graph doesn't represent the grim reality,
it just shows that people in the US have stopped searching for the term.

StackOverflow is Not Where People in the Elixir Community Ask Questions

I agree that it's a shame that people in the Elixir community have stopped asking questions on SO.
But there are several reasons for it:

  1. ElixirForum is where people in the Elixir community go to find answers because it's helpful and beginner-friendly.
    There are new questions being asked on the forum every hour: https://elixirforum.com/new
    image
    And you will always get a helpful reply even for the most "noob" questions.
    By contrast if you ask a beginner question on SO it will often be flagged as "off topic", "duplicate", down-voted or closed!

When you search on Google for an issue/error/feature in Elixir, most of the time an ElixirForum thread will be surfaced at the top of the results. That rapidly becomes self-reinforcing. If people find answers on ElixirForum they will ask their questions on the forum too. I always make a point of cross-posting my questions to both places. But in general the Forum has better and more helpful answers.

  1. StackOverflow is a Unwelcoming and the quality/helpfulness of answers is lower.
    Sadly, StackOverflow is widely known to be very unwelcoming to beginners. They even wrote a blog post on it:
    https://stackoverflow.blog/2018/04/26/stack-overflow-isnt-very-welcoming-its-time-for-that-to-change

When you're in the "Top 3%" on StackOverflow https://stackoverflow.com/users/511069/leo-gallucci
image
it can be easy to forget just how intimidating and unwelcoming the platform can be to beginners ...

The reality is that a lot of people have just gone off SO completely.
Some people even consider it to be an "Antipattern":
https://dev.to/codemouse92/has-stackoverflow-become-an-antipattern-3icb
image

  1. Most questions in Elixir are already answered. The language is very well documented and stable.
    By contrast when a language or web framework has many breaking changes or a lot of complexity this leads to more questions.

So in conclusion:

Yes, there are fewer Elixir Questions on StackOverflow
because there is a much better place to get help with Elixir.
It doesn't mean Elixir usage is declining ... If anything it's accelerating!

image

@nelsonic nelsonic changed the title Would you still pick Elixir in 2020? Would you still pick Elixir in 2021? Jan 1, 2021
@Deep-Codes
Copy link

@Deep-Codes Deep-Codes commented Feb 18, 2021

This thread has changed the way I perceive programming languages.

I am learning Elixir rn, with a good grasp of TypeScript, Ruby Let's see how things go!
Thanks a ton for this!

@Nmuta
Copy link

@Nmuta Nmuta commented Feb 19, 2021

Wow. I'm impressed that this thread is still going. I started learning Elixir in 2018 and, having a history of being both a Ruby / Rails dev and a JS dev ( React, Angular ) I thought that Elixir and Phoenix would be the new hotness and a fertile land of opportunity and bliss.

I do think that Elixir is bliss. Although the learning curve is fairly steep, the rewards of functional patterns , pipes, and the simplicity of thinking, the promise of everything the underlying Erlang ecosystem offers, all of that make it a wonderful language to work with.

However, in 2021, there are some glaring issues that have already been stated throughout this thread.

The first issue is community.
In Denver, where I live, I attended a few Elixir meetups and it became very clear to me that the Elixir community will never compare to the communities that have formed around Ruby, Spring Boot, Node, React, Angular, etc. It's just never going to have that kind of mass appeal and subsequently, the opportunities are slim. Yes, there will be times where if you know Elixir, you can "name your price" because supply and demand is working in your favor. The problem is the demand. Some teams that moved from Rails to Phoenix in 2016 are now migrating to other platforms because it's so hard to find Elixir developers... harder even than finding Ruby devs now. So the pool gets so small that 5 years from now, the opportunities just may be too few and far in-between.

The second issue is Phoenix itself. Of the people I've talked to, Rails beats Phoenix hands down in terms of developer experience. And nothing beats ActiveRecord in terms of the dev experience. This leads to a larger issue.... most everything about Elixir is better and more efficient than Ruby, and most everything about Ecto is more efficient than Active Record, but Active Record and Ruby are 10 times easier to use.

There's something to be said for frameworks and languages that are intuitive and user friendly. Elixir, Phoenix, Ecto are precision tools that are somewhat isolated due to the steep learning curve. Of course, you don't have to use Phoenix if you're using Elixir. But for me, I like to be able to harness the power of frameworks because I don't like to re-invent the wheel when I'm building something.

The way I feel is that if I needed to build a fault tolerant, fast, bullet proof back end for something like a social media platform, and I were developing it and maintain it personally with a few trusted comrades, I would choose Elixir and Phoenix. But if I wanted to build my career on a language and framework that has a large, vibrant community, tons of open source resources, ability to find answers on StackOverflow, etc. etc. ... I would stay far away from it.

IMO Elixir is the tool you want to use to build YOUR business, your company, your software, assuming that you can groom the in-house talent and keep your applications going with your own efforts or a tightly knit team that you are managing. It may also be a good tool if you want to find something to build an expertise in that will get you into a few niche markets.

But if you want to learn a language to build your marketability as a dev to build apps for other people, it's a good choice but its popularity is waning, and you may find that the time invested in Elixir may not be the best investment if you don't have a personal passion for the language and a personal /business use for it yourself.

Highly subjective opinion, I know. Open to pushback and feedback.

@batara666
Copy link

@batara666 batara666 commented Feb 21, 2021

You ask me would you still pick elixir for 2021?, after 1 year with Elixir, I Don't think i will continue with it, beside that, Go is the best choice for me, my team and my company

@batara666
Copy link

@batara666 batara666 commented Feb 21, 2021

why someone hide my comment? do you feel my opinion attacking your beloved language?

@ed-chung
Copy link

@ed-chung ed-chung commented Mar 16, 2021

but [Elixir]'s popularity is waning

What is your basis for this assertion? Elixir broke into the top 50 languages of the Tiobe index for the first time this Feb and has maintained it for a second month. I'm not saying it's going to skyrocket through the ranks, but it appears that the popularity isn't exactly waning.

https://www.tiobe.com/tiobe-index/

@jittrfunc
Copy link

@jittrfunc jittrfunc commented Apr 2, 2021

I feel if we are strictly comparing Elixir with Ruby it ends up with a bit of apples to oranges comparison.

Although Elixir has some syntactic sugar to make its syntax pleasant or ruby-like but that's where the similarity ends. Its still all Erlang and BEAM under the hood which is a completely different language and runtime with its own niche which is soft real time systems and easy multicore concurrency. Language wise, Elixir being a functional programming language will also have a different way of doing the same things in a more functional manner as compared to Ruby which is purely object-oriented. On the learning curve, I have seen instances of companies where developers got productive enough to write production quality code in Elixir within 3 weeks with no prior experience with it.

But the goal was not only to provide a faster alternative for Ruby/Rails or web developers in general but also a more developer friendly way to utilize a more efficient runtime (BEAM) which can be used to solve a host of different other problems.
If one looks at what Erlang has been able to achieve with its philosophy (Whatsapp, Riak, Rabbitmq, etc), it gives one an idea of what Elixir is capable of doing as quoting Jose Valim's own words - "Elixir is just a drop on top of Erlang". I am really impressed with the efforts that went into creating Broadway, Nerves and Nx which opens up a host of different avenues to use Elixir outside of web development.

All these said, I don't think practically Elixir will have the similar number crunching performance as compiled languages (unless we are making use of NIFs) but that's not what Erlang was designed for anyways and in the end it all boils down to using the right tools for solving the right problems.

@Nmuta
Copy link

@Nmuta Nmuta commented Apr 20, 2021

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet