TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Ask HN: Who regrets choosing Elixir?

328 pointsby seancolemanalmost 5 years ago
I’ve seen a few Elixir success stories posted here recently. Virtually all comments are from raving fans that have nothing but the best to say about Elixir.<p>As someone with primarily a Ruby &#x2F; Rails background, I’m choosing a language for a new API project and considering Elixir. I’m interested in hearing some counterpoints to Elixir, especially in how a smaller ecosystem Of 3rd party libraries slowed down development.

46 comments

as-jalmost 5 years ago
TL;DNR, use a language your company can support. It doesn&#x27;t matter how suited to the job a language is, if it&#x27;s single Engineer or small team, what happens when they move on? How do you support it? Who&#x27;s on call?<p>Not Elixir, but a cautionary tale from our Erlang project. ~8 years ago a our IoT backend was written in Erlang, this was the early days of IoT, so sure it made sense as a technology, could scale well, handle all the symmetric sessions, etc. It was a good tool for the job and in theory could scale well.<p>But, there&#x27;s always a but. We&#x27;re a Python shop on the backend and C on embedded devices. Engineers move on, there some lean times, and after a few years there was no one left who could support an Erlang system. So we hired for the position, and it&#x27;s key infrastructure, but not really a full time project, so we hired a Python+Erland person.<p>But! Now they&#x27;re on call 24&#x2F;7 since the regular on call roster are python people and when the Erlang service goes wrong, it&#x27;s call the one engineer. So, do you hire 2 or 3 people to support the service? No, you design it out. At the time is was 2018, and IoT services were a plenty, so we could use an existing service and python.<p>Another way of looking at it, let&#x27;s say it&#x27;s a critical service and you need at least 3 people to support it&#x2F;be on call. If each engineer costs $200k&#x2F;year, that&#x27;s $600k&#x2F;year. Does this new language save you that much over using a more generic and widly known language in the org?
评论 #23285921 未加载
评论 #23286791 未加载
评论 #23285981 未加载
评论 #23291360 未加载
评论 #23285784 未加载
评论 #23286508 未加载
评论 #23288218 未加载
评论 #23287583 未加载
评论 #23299167 未加载
评论 #23288017 未加载
评论 #23285802 未加载
bluesnowmonkeyalmost 5 years ago
Been paid to write mainly Elixir full time since 2017. Still quite positive about it overall but I can talk about some constraints in an enterprise environment.<p>In a large company with lots of services in many languages, avoid putting business logic in your Elixir code. Business logic adds coupling to related code in other systems that often all need to change together, or get changed in a hurry. Either way, the engineer trying to do the change probably won’t know Elixir. Likely they were appointed to make the change by a PM who doesn’t know or care much about which systems were built in which languages and who knows those languages. And that engineer won’t know Elixir, and they’ll complain about being unable to work on your Elixir system, and it will give Elixir a bad reputation at your company in the eyes of managers and PMs. It won’t matter much if your system has high uptime or low tail latency or whatever.<p>The solution to this is to only use Elixir for building infrastructure. Nobody cares much what language PostgreSQL or RabbitMQ or Kafka are written in. You don’t modify the source code for those things typically, you just use them through some kind of API. Similarly if your company needs a notification delivery system, you can build that in Elixir. You just have to do it in such a way that nobody will ever be blocked trying to launch a new kind of notification because they need to learn Elixir first. Make it fully accessible and extensible through its API so they never need to know what language you used.
alex55almost 5 years ago
I work for a Ruby on Rails shop and we used Elixir for two projects about a year or two ago when it was getting a lot of good press.<p>The first project was an API that was intended to serve as a middleman between a few legacy services. Basically the company that hired us was building a new JSON API but didn&#x27;t want to rewrite all their old code and our job was to consume the output from their ugly legacy APIs and produce nice JSON.<p>Elixir&#x2F;Phoenix worked for the first service, but after that we ran into problem after problem. One of the legacy services used HMAC authentication and Phoenix (at the time?) didn&#x27;t really support that. We were eventually able to hack around it without too much pain. Another service used XML and we had a lot of trouble finding XML libraries. There were some but nothing remotely as nice as Nokogiri. While all of this was happening, adding to our frustrations, a new version of Phoenix was released with a lot of changes. The only documentation for how to migrate an existing app was a typo laden GitHub Gist by the author of Phoenix. The final straw was when we got a call from the client about another service we had to integrate. This one used JSON but the <i>order of the keys</i> was important (please for the love of whatever god you believe in never do this). When we had to decide whether to write a custom JSON parser or move to Ruby, we rewrote the thing in Rails.<p>The second project was already a few thousand lines of code when we started working on it. It was a dumpster fire of a project but the devs who built it praised Elixir to the skies and said it was way better than their old Rails version. So take that for what it&#x27;s worth.<p>We&#x27;ve decided not to do any new projects in Elixir for now but we&#x27;re leaving it open for the future. It is a nice language to work with and, as you can see from the other comments, there are some projects where it shines.<p>I have two suggestions for you:<p>1. Talk to people in real life about Elixir&#x2F;Phoenix. Most other devs I talk to in person at other agencies that tried Elixir have (surprisingly) neutral or slightly negative feelings about Elixir&#x2F;Phoenix. Some percentage of people on Hacker News absolutely love Elixir (and often hate Ruby&#x2F;Rails) and they usually flood the comment section of any Elixir article.<p>2. If you don&#x27;t fully know the problem domain, use something with good library support. I don&#x27;t know what your project is, but if you control the front and back ends or if you know exactly what features you&#x27;ll need, there will probably be no problems choosing Elixir. Plus, it&#x27;s always fun to learn something new. If your project is &quot;some kind of API that needs to do X and maybe some other things we don&#x27;t know yet&quot; I would stick with Rails (or Python&#x2F;Java&#x2F;something with a lot of libraries). The worst place to be is not being able to do something simple because of a lack of library support and having to explain to your client&#x2F;manager&#x2F;coworker that it&#x27;s because you read on Hacker News that writing &quot;a |&gt; b&quot; instead of &quot;a.b&quot; is the future.
评论 #23285415 未加载
评论 #23287333 未加载
评论 #23288863 未加载
评论 #23287288 未加载
评论 #23286184 未加载
briansteffensalmost 5 years ago
Erlang&#x2F;OTP is really cool and I found the Elixir language pretty reasonable and even nice but:<p>1. Elixir is still a pretty leaky abstraction over Erlang. In my experience it&#x27;s not enough to learn just Elixir, I regularly had to dive into Erlang library source code to debug or answer questions. This somewhat negates the benefit of a small, stripped down syntax when you often have to learn another one in conjunction.<p>2. Maturity of ecosystem. This should improve over time but I&#x27;ve had challenges finding high quality libraries, especially for things like database connection drivers or making network requests. It&#x27;s often hard to tell how well-supported or complete a library is and regressions were a regular occurrence.<p>3. Documentation. In practice I rarely found official documentation complete or even helpful (outside of big projects like Phoenix &#x2F; Ecto). Even core Erlang libraries had surprising chunks missing. It&#x27;s been awhile but I remember it being very hard to figure out what options were supported in Erlang&#x27;s TLS wrapper. I ended up stitching together pieces from the OpenSSL documentation, Erlang source code, and lots of trial and error.<p>4. OTP overlap with other scheduling systems. This isn&#x27;t a design flaw as much as a potential footgun depending on how you deploy Elixir code, but there is a lot of overlap between the cluster management support in Erlang&#x2F;OTP and, for example, container orchestration in Kubernetes. Both support scheduling some concept of tasks, configuring redundant copies of tasks, detecting problems, and restarting tasks according to policy. Deploying an OTP application on top of Kubernetes (on top of Linux) results in 3 layers of OS-like task scheduling to learn, teach, maintain, and debug through, all with distinct tooling, terminology, and limitations.<p>All in all, I found Erlang&#x2F;OTP to be a pretty interesting and compelling platform, especially for certain special purpose applications. If I ever use it again I&#x27;ll probably skip the extra layer of Elixir syntax and write straight Erlang.
评论 #23287741 未加载
评论 #23286225 未加载
pavel_lishinalmost 5 years ago
My employer has chosen it, and while it was fun to learn and is very neat, I don&#x27;t think I&#x27;d ever write Elixir code for anything but a hobby project, especially if a large team is working on it.<p>1. Dialyzer is just a huge piece of shit. It&#x27;s an incredibly impressive piece of shit, and makes it possible to pretend that Elixir supports typing, but it has so many edge cases that we&#x27;ve run into them writing even trivial code - and it misses a lot of things that, e.g., Java or Typescript would have no problems with.<p>2. Testing is kind of fiddly and annoying. It&#x27;s very difficult to consistently mock things out. And yes, yes, it&#x27;s a functional language so in theory every function should be small and trivially testable, but unless you&#x27;re writing toy code, eventually you <i>will</i> have dependencies you would like to mock out in tests, and you will have complicated business logic living _somewhere_.
评论 #23285986 未加载
tonyarklesalmost 5 years ago
Right tool for the right job, I think. I’ve had absolutely wonderful experiences with Elixir doing web apps (both LoB style and SaaS style). Probably the best one, and it’s such a canonical example, is a group chat app using Websockets. It just feels so good, and with libcluster, multiple nodes in K8s can autodiscover and join each other. No problems at all having chats where the members are connected to websockets on different nodes; everything mostly Just Works.<p>On the flip side, I prototyped out a drone flight controller in Elixir thinking that the “fail and restart” portion would be awesome for reliability (if the RTK receiver craps out and restarts, no big deal, the EKF can just fall back to using the IMU until the RTK is back online). That part of it all worked great, but doing real-time numerical computing in Elixir is painful. As was generating the signals for the ESCs. I was making C modules to try to talk to the ESCs, and errors in those modules had the ability to corrupt the BEAM. I started looking at ports too (where the C code runs as a separate process), but gave up when it felt like everything was feeling way too complex and fragile. Let it crash is great, but “it crashes all the time” is not. I could have probably gotten it working, but... not a great domain for it.
评论 #23284613 未加载
评论 #23284423 未加载
评论 #23284417 未加载
anonyfoxalmost 5 years ago
Doing Elixir since 2016, deployed multiple Phoenix Projects to Production.<p>Of you want to build dynamic web applications, phoenix+LiveView is imo _the_ best Option currently. It also keeps the promises: reliable (zero-maintenance apps running for years on heroku), productive (prototyping things is really fast: like rails 2&#x2F;3 days), fast (templates render fast even when complex). It is also great to have actor processes and ETS at your fingertips.<p>Having said that: dynamic typing truly sucks for bigger projects&#x2F;large teams. It is awful how much you have to write tests for, and these tests will slow down further velocity when things will change... stellar opposite to Rust.<p>Never attempt to do any serious number crunching in Elixir&#x2F;Erlang, the BEAM truly is not made for this stuff. Plan to use&#x2F;write NIFs or Ports for computational tasks. Even compiling larger Phoenix codebases will take minutes if you aren’t cautious of using „import“ in modules.<p>Finally: deployment is really the major pain point. I love the single file deployment story of rust and go.
评论 #23287169 未加载
freedombenalmost 5 years ago
I&#x27;ve done both, much more Rails than Phoenix, but I&#x27;m not doing any new development in Rails.<p>I do regret choosing Elixir at times for the following reasons:<p>1. I am new to the language (I&#x27;ve been using it for &quot;years&quot; but only very part time (not part of my day job)). While the functional approach does lead to much more elegant code, it can also be super esoteric to me as I&#x27;m new to and somewhat uncomfortable with the idea of recursion for everything. There are pre-written macros to help of course, but it&#x27;s just training wheels. This will improve with time and experience. I also don&#x27;t fully grok how to write my own macros. What I really need to do is spend a couple of days deep diving until I get it.<p>2. Phoenix is changing quickly (tho slowing down). I wrote some stuff if Phoenix 1.2, 1.3, and the upgrade path is a bit involved (no more so than a rails upgrade was tho). I suspect it&#x27;s stabilizing, but when I first created one project it used brunch for assets, now it uses webpack (which is a good choice, but as a non-frontend person I&#x27;m not well equipped to make the change myself to upgrade my project). 1.3 (IIRC) also dropped models, so that required some refactor to work as a 1.3 project.<p>3. Deployment changes quite a bit. The old rules for Ruby go out the window. You can still treat your Phoenix app like a rails app if you want, but it&#x27;s like buying a Ferrari to drive around the neighborhood at 25 mph. This takes some learning, and while much of the old rules about scalability, etc are still applicable, they do change a bit and it requires making new mistakes and learning from them.<p>4. I get irritated now when working with non-functional code in other languages. My tolerance for side-effects is down to nearly zero, and I get irritated when there&#x27;s a dozen lines to do something that in Elixir is a couple of pipes.<p>That said, overall I much prefer Phoenix&#x2F;Elixir. None of the downsides are the fault of Elixir, so I believe with time It&#x27;ll be a no-brainer. I am already at the point where I don&#x27;t start any green field projects in Rails (tho I do use Ruby extensively for scripting as it&#x27;s by far the best scripting language IMHO).
评论 #23287475 未加载
jeremyjhalmost 5 years ago
I&#x27;ve been developing Elixir since 2013, and professionally full-time since 2017. Honestly my only complaint is the lack of static typing. There is no way I&#x27;d prefer Ruby; Elixir gives you a lot more compile time checking and static analysis. As a project gets larger, it gets harder and harder to refactor because of the despair that sets in when contemplating fixing dozens or hundreds of broken tests that you can only discover by running them.<p>I really don&#x27;t know what I&#x27;d prefer to it though, every language has its pros and cons and static typing systems while nice also can introduce their own problems. I&#x27;ve spent days tinkering with type abstractions in Haskell rather than getting work done - not because I had to but because I knew more expressive solutions were possible and the allure of them was too hard to resist. Elixir is a fantastic language for getting work done.
评论 #23286154 未加载
brandonmencalmost 5 years ago
We are EOL&#x27;ing Elixir at work - almost all of our stuff is built with Rails. My personal web projects are back to using Rails. I also never did contract work that produced Phoenix apps because I don&#x27;t want to leave clients with something that they can&#x27;t easily find support for later on.<p>Lots of great ideas in Elixir, Phoenix, and Ecto, but it just didn&#x27;t hit the critical mass or completeness that makes the Rails ecosystem impossible to walk away from.<p>And because abandoning Rails is not a practical option, maintaining brainspace for an additional thing that is not widely used and nearly identical in function is not worth the cost.<p>Sadly.
mistyfudalmost 5 years ago
I&#x27;ve been using Elixir for three years in a production setting with a small team of engineers. I still love the language, the community, and everything it has taught me as an engineer. However, there are real downsides to moving forward with Elixir:<p>- If your engineers are used to the Ruby, JS, Python etc. ecosystems of finding a library for everything, they may become frustrated with the smaller Elixir ecosystem. In my experience, this is actually fine because it means you have fewer external dependencies to wrangle.<p>- Differences between compile-time and run-time configuration is a foot gun. We ended up moving almost everything to run-time configuration, which is not what you see recommended by many libraries and examples. This is slowly changing however.<p>- Deployment is a bit unique, and working with building releases can be confusing for those used to deploying dynamic languages that are not compiled.<p>- Functional programming requires unlearning many OOP best practices. This can slow down engineers new to the language.<p>A lot of these issues IMO comes from how Elixir was initially marketed as a &quot;fast Ruby&quot; and Phoneix &quot;fast Rails&quot;. Once you get past the syntactical similarities you realize the semantics are very, very different. Elixir is much closer to Erlang and Clojure than it is to Ruby.<p>Elixir is an excellent language for motivated engineers solving novel problems. If you are building a standard CRUD app, I think you will find more success with Rails or Django in 2020.
s3cur3almost 5 years ago
I’m primarily a C++ dev, so that colors a lot of what I think about the 3rd party library situation in Elixir. Because of the abysmal state of package management in C++, it’s usually easier to implement stuff yourself (tailored exactly to your own needs, and therefore with an extremely limited scope) than it is to bring in a heavyweight third-party library.<p>For that reason, I was pretty comfortable coming to Elixir and implementing Somewhat esoteric, games-specific networking stuff myself. It would have been nice if the library had already existed, but I am so glad I went with Elixir rather than Node or PHP (which both do have the game networking library I needed).<p>My experience has basically been that the “fat head” of open source libraries exists in Elixir, but the long tail of more esoteric stuff does not. By its nature, though, you won’t need 99% of the esoteric stuff available in other languages.
to11mtmalmost 5 years ago
I deal with Elixir currently.<p>Although, actually, I&#x27;m converting it all to C#, since we don&#x27;t really have a lot of elixir people in the shop (I had to learn Elixir just to do the maintenance when I came onboard.)<p>The lack of APIs can be painful at times. What is there sometimes isn&#x27;t the most fun to deal with outside of the ecosystem (the driving force of the language conversion was issues using Phoenix Channels reliably with non-elixir consumers, and during the conversion we are dealing with the minor pain of pulling certain data out of an mnesia data store.)<p>But, I mostly enjoyed my time playing with it.<p>Biggest observation was that the IDE Tooling didn&#x27;t feel as nice as, say, F#, which makes a bit of a difference when you&#x27;re not dealing with the language day-to-day and need helpful reminders for how you&#x27;re getting certain things wrong.
phunehehe0almost 5 years ago
I can&#x27;t say I regret learning Elixir, but a coworker once said he thought I thought it was the worst programming language in the world :)<p>My biggest annoyance with Elixir is that the ecosystem seems to impose a lot of opinion on how things should be done, and sometimes actively makes it hard to do things differently. In some edge cases I couldn&#x27;t do the easy thing because it&#x27;s &quot;wrong&quot;, and couldn&#x27;t do the right thing because it was not yet implemented. I believe this is with good intention and is mainly a side effect of the relatively small and young community, as in many areas the de facto libraries are made by the same few people. I suppose this problem will get better as there are more libraries to choose from and&#x2F;or more contributors to those libraries.<p>Another, milder source of annoyance for me is the lack of functional programming features in a functional programming language. To invoke a function that has been passed as a parameter you need a dot. No currying etc. Still, you can get things done and with these limitations it&#x27;s harder to get yourself into a mess of functions being passed around (but not too hard if you try).<p>All in all, to me what Elixir brings to the table is more than enough to offset its annoyances. However when it comes to choosing Elixir, I agree with other comments suggesting to choose something the team is comfortable with.
neyaalmost 5 years ago
I&#x27;m one of those raving fans you talk about. I always love sharing the success stories of Elixir with everyone because it deserves so much more love than it currently receives.<p>I came from a Rails background too and Elixir is so much better than even Ruby (which I&#x27;m a huge fan of already) simply because it forces you to think in terms of functions rather than OOP based. Most people who try and give up early on Elixir - including myself (I gave up initially after a few weeks actually, before going back to it again) was simply because I was trying to code things like I would normally do in an OOP setting.<p>For example, you don&#x27;t use FOR loops in Elixir, you don&#x27;t nest switch cases. If you try to be in an OOP mindset with this language, you WILL fail. And that&#x27;s a good thing. The language constantly challenges you to rethink a lot about your code. And it always results in better code when you do it functionally. Eg. using pattern matching instead of multiple if else clauses.<p>The downside of Elixir is the ecosystem isn&#x27;t as mature as Ruby, so, for some of the things you&#x27;re trying to accomplish, you won&#x27;t find ready made libraries, or they won&#x27;t be maintained anymore. Sometimes, you will be forced to write something from scratch and that can cost valuable developer time. Integration of stuff like GraphQL can be too verbose compared to other programming environments as well. But, the language itself? It&#x27;s hard to complain. My entire consulting career has been built around Elixir since I made the switch ~3+ years ago. That&#x27;s how good it is.
评论 #23285573 未加载
strzibnyalmost 5 years ago
You are asking the right questions.<p>In our particular case,<p>1, we did not have good libraries for file uploads to Azure and to handle the signing for securely displaying them.<p>This was solved by 2 very simple modules. In the end, both things are fairy simple unless you want them complicated (ActiveStorage can sure do &quot;more&quot; out-of-the box).<p>This also means the code it&#x27;s super straight-forward and understandable.<p>2, we did not have a good library for SOAP.<p>We started to build a simple SOAP library. This I would consider a pain, but there is always option to avoid it (see no. 3).<p>3, we did not have good PDF libraries.<p>I happened to package my Ruby library (using Prawn) as a Docker container and simply call its API. This could also simply solve no. 2.<p>On the other hand hand,<p>1, we got one of the best GraphQL libraries out there (Absinthe)<p>2, we got a really fast test suite (once everything compiles, that is)<p>3, we are getting great tooling like Phoenix LiveDashboard for free<p>Also I want to note that deployment is now quite easy with &quot;mix releases&quot; (as compare to what it was). You even get a remote console that connects to your running cluster. No problem.<p>[0] <a href="https:&#x2F;&#x2F;nts.strzibny.name&#x2F;phoenix-livedashboard-request-logger&#x2F;" rel="nofollow">https:&#x2F;&#x2F;nts.strzibny.name&#x2F;phoenix-livedashboard-request-logg...</a>
vinhnglxalmost 5 years ago
I&#x27;m working for a software consultant in Singapore. We tried Elixir for a few projects, and now we&#x27;re still trying. So, I can share a few experiences from my view.<p>- Elixir and the Phoenix framework is perfect when building concurrency systems. Our company had made a ticketing system, solving the tickets for &quot;Cirque du Soleil - Hongkong 2018&quot;. During two months of the event, our system (one Elixir&#x2F;Phoenix server - scale up to two - one load balancer) can handle more than 5000 tickets per second. We were so excited. Unfortunately, the client&#x27;s company closed after that. So the project was closed too.<p>- The second project was a product of a finance startup. Not so much thing I can share in this project, but the main feature is chatting. We used the Phoenix Channel and Graphql Subscription for this feature.<p>- In the side project, one member of the team used Phoenix Liveview to build a Coup game (board game).<p>So, in general, when I work with Elixir, I see a few pros and cons:<p>Pros:<p>- Fast. Functional programming is really fun. I love pattern matching.<p>- Not so hard to write tests. It&#x27;s easy to mock external APIs. (Check out this blog: <a href="http:&#x2F;&#x2F;blog.plataformatec.com.br&#x2F;2015&#x2F;10&#x2F;mocks-and-explicit-contracts&#x2F;" rel="nofollow">http:&#x2F;&#x2F;blog.plataformatec.com.br&#x2F;2015&#x2F;10&#x2F;mocks-and-explicit-...</a>)<p>- Easy to deploy. After dockerize the application, I can run it anywhere. The ticketing system was run on AliCloud, and the second project was run on Kubernetes (AWS).<p>Cons:<p>- Lack of supported libraries for external services. Sometimes, our team has to write a wrapper library to call directly to external services&#x27; APIs.<p>- Not easy to hire an Elixir developer in Singapore. Our team tried to hire Ruby on Rails developers and train them. But they were not feeling interesting in learning Elixir, so they left the team.
choiwayalmost 5 years ago
A couple thoughts after using it for a couple years.<p>1. It actually takes a while to get your head around the fact that the biggest advantage of elixir is having access to the battle tested features in OTP. It takes longer to realize that these benefits don&#x27;t come for free and elixir might not be the best solution to your problem.<p>2. The learning curve for writing functional code is different for different people. As a result, it&#x27;s impossible to figure out before hand how long it will take a team used to writing pythonic code, for example, to start writing functional, elixir code.<p>3. You&#x27;re able to emulate something like type checking between pattern matching and ecto schemas but it&#x27;s not type checking. Be prepared to spend time coming up with best practices for writing tests.
phtrivieralmost 5 years ago
If you come from the Ruby &#x2F; Rails world, then you&#x27;ve probably developed some level of skin thickness about my biggest problem with elixir: it&#x27;s dynamically typed, therefore almost impossible to write right the first x times. (For a value of `x` that&#x27;s big enough for me.)<p>Coupled with the relative slowness of the compiler, this means your average development session is a loop of<p>1. trying to get something that pass syntax check<p>2. starting your application<p>3. making a request<p>4. `no match of right hand side...` because you had a function that expected `{:error {:ok {:foo %{bar: 0}}}` down a five-level-deep stack, and you typed `%{&quot;bar&quot; =&gt; 0}`, you fool ! Or maybe you typed &quot;baar&quot;. Or maybe you did not type it, and some of your colleague did. How would she know ? `dialixir` was probably disabled a few years ago because the error messages were not helping anyone, and you&#x27;re not going to write `@spec` anymore at this point.<p>I heard some people managed to overcome this by using the REPL, but in my experience it just means making the spelling mistakes in a terminal rather than in an editor.<p>Elixir is great for code that mostly does &quot;routing&quot; of messages from sources to sources.<p>Phoenix channels are a blasts.<p>Pattern matching would be great if the compiler could help you with the obvious mistakes.<p>Libraries are exactly how you would expect for a few-years-old language. Name one topic, and there are three competing libraries : one of them does not work, the other one is unmaintained, the third one has completely changed its API in latest alpha. You&#x27;re going to pick the wrong one anyway.<p>If I could go back in time, I&#x27;d avoid writing any kind of business logic in it.<p>(Opinions mine.)
emerongialmost 5 years ago
What are the alternatives to Elixir? I&#x27;m a proponent of functional&#x2F;LISPy languages and when it comes to developing web applications, Elixir with Phoenix and Ecto just works extremely well. Maybe the next best would be Clojure since the JVM brings a huge ecosystem with it, but I did a cursory look into it a while ago and the frameworks just didn&#x27;t seem to be on the same level as Phoenix&#x2F;Ecto.<p>The main complaints are valid: hiring issues, lack of a good typesystem, small ecosystem. Yet I have been the most productive with Elixir and would rather move to something <i>better</i> than regress to the mean just because Elixir isn&#x27;t a mainstream language yet (which would solve the hiring and small ecosystem issues).
评论 #23286821 未加载
评论 #23287776 未加载
wnevetsalmost 5 years ago
I&#x27;ve found elixir easy to write but a pain to read, especially when it comes other people&#x27;s code.<p>Elixir is also dynamic but with annotations that gives the illusion of types. It&#x27;s really the worst of both worlds.
Areading314almost 5 years ago
Recently was involved with an elixir backend being phased out in favor of python because of the following reasons:<p>* Not enough engineers can write&#x2F;understand elixir which kept leading to people being blocked<p>* Library ecosystem for scientific applications is lacking<p>* The language itself is confusing and the macro capability causes code to be uniquely incomprehensible in each different module<p>It was a worthwhile experiment but you just can&#x27;t beat the advantages of having extensive documentation and expertise in the more mainstream languages unless you have very specific performance requirements.
triskwelinealmost 5 years ago
Our Ruby &#x2F; Rails agency tried implementing a project in Elixir. After 3 weeks we stopped the experiment and re-did everything in Ruby.<p>What stopped us was not so much the lack of libraries, but programming ergonomics. E.g. when using keyword lists for function options, callers need to pass the keywords in the exact same order. Also mocking was difficult in tests.<p>Elixir is a great project with a friendly community, it just didn&#x27;t work for us. YMMV so by all means try it out if you&#x27;re interested!
评论 #23284306 未加载
评论 #23284480 未加载
评论 #23284364 未加载
raartsalmost 5 years ago
I wrote an Elixir GraphQL-to-multiple-REST-backends proxy two years ago. It used OAuth and ran redundant in a Docker Swarm. Also wrote an Expo+Apollo PoC for the mobile Dev group to start from.<p>The backends were swagger which allowed me to autogenerate the Elixir source code for the GraphQL resolvers from the swagger.json file. It was a project for a telecom company which also employed Erlang programmers.<p>My experience: stability was outstanding, performance reasonable. Got a lot of praise for it. Only got one big report in two years.<p>Would I recommend it? Only to experienced software engineers.<p>Would I recommend it to companies? Only if you understand that every new tool or stack is a strategic decision.
CompuIvesalmost 5 years ago
We&#x27;ve been using Elixir for our API server from the start. It&#x27;s a great language and scales really well. We needed to add a websocket API at some point, and now it&#x27;s our channel with most throughput. Phoenix handles it fine, and we&#x27;re still able to triple the throughput comfortably.<p>The one thing that we struggled with Elixir with is that it&#x27;s quite hard to find people that know Elixir. For a long time I was the only one doing Elixir in the company, which introduced a bottleneck. That said, when you find someone who knows Elixir they tend to know Elixir (and a bit of infra) quite well.
asfarleyalmost 5 years ago
I tried implementing an algorithm for tracking multiple objects based on graph-cuts using Elixir. I was disappointed in the lack of strict typing in the language, since this is one of the things that made me want to try functional programming.<p>In order to tell the type of various method signatures, it seems like you have to go looking at other areas of your program. I’m aware that it’s possible to annotate method signatures, but this still didn’t lead me to feel secure. I think I was hoping for&#x2F;expecting something more Haskell-like.
评论 #23290874 未加载
评论 #23289771 未加载
iloveitalyalmost 5 years ago
I <i>really</i> enjoy Elixir. I&#x27;ve used for a fun side project. It&#x27;s an awesome language with some really interesting concepts.<p>However, I wouldn&#x27;t use it for a real project:<p>1. The ecosystem doesn&#x27;t compare to ruby&#x2F;python&#x2F;javascript. There&#x27;s a lot of missing packages and abandoned libraries. I ended up having patch a bunch of libraries I used.<p>2. The tooling that exists is nice and &#x27;just works&#x27; but there&#x27;s a lot that&#x27;s missing from ruby land: <a href="https:&#x2F;&#x2F;elixirforum.com&#x2F;t&#x2F;help-an-elixir-beginner-find-missing-development-tooling&#x2F;24632" rel="nofollow">https:&#x2F;&#x2F;elixirforum.com&#x2F;t&#x2F;help-an-elixir-beginner-find-missi...</a><p>3. The deployment story is horrible. The heroku&#x2F;dokku buildpacks didn&#x27;t work by default and it&#x27;s not obvious how you can easily deploy a mix&#x2F;distillery release without writing your own deploy scripts. <a href="https:&#x2F;&#x2F;elixirforum.com&#x2F;t&#x2F;official-heroku-dokku-buildpack&#x2F;28867" rel="nofollow">https:&#x2F;&#x2F;elixirforum.com&#x2F;t&#x2F;official-heroku-dokku-buildpack&#x2F;28...</a><p>4. Phoenix != Rails. There&#x27;s many many obvious things that are missing. `mail_to` for example.
throwaway286almost 5 years ago
I&#x27;ve spent some time learning it that I don&#x27;t regret.<p>However, I dislike the GenServer syntax, it feels too complicated with random tuples all over the place. Also, I feel like the job market is too small. I wasn&#x27;t able to find a job using it (although maybe COVID is to blame here).
brenden2almost 5 years ago
I&#x27;ve done a fair bit of both Ruby and Elixir. My impression is that Elixir leaves a lot of the legacy cruft behind, and it has a much smaller language feature set (which is IMO big bonus). The language is pretty easy to grasp quickly as a result. There isn&#x27;t much in the way of quirky syntax or backward compatibility weirdness.<p>Probably the biggest advantage of Elixir over Ruby is the runtime. The Erlang VM has proper concurrency, and it provides really nice primitives for working with it.<p>The ways in which Elixir sucks tend to be the same as Ruby: dynamic types, somewhat slow runtime (compared to C, Java, Rust, Go, etc). I&#x27;d also add that library support is still a bit weak with Elixir, but it&#x27;s always getting better.
评论 #23284461 未加载
评论 #23284265 未加载
yodialmost 5 years ago
I&#x27;ve spent roughly 3-4 years working experience on Django + Python in total. I&#x27;ve switched to Elixir &#x2F; Phoenix since 2 years ago. I can say, the two biggest cons (despite is many cons) is the packages maturity and doing heavy lifting processing.<p>The first one, I can&#x27;t complaint. Every programming language have it&#x27;s weakness, to solve that I&#x27;m offload processing stuff into Rust. Luckily, Elixir have NIF integration with Rust.
flaquealmost 5 years ago
One counter point to elixir is that there&#x27;s a significant learning wall to onboard new developers, more so than simpler a language like Go or Python.
评论 #23284457 未加载
评论 #23284087 未加载
评论 #23284108 未加载
zulganalmost 5 years ago
it was huge mistake for us, it was chosen for the wrong reason, to solve a non-problem, complicated everything without adding any value.<p>* cant find people for it and if you do they come because of the tech not because of the real world problems we are trying to solve.<p>* the no types thing makes people write tests that test for typos and make refactoring incredibly difficult because you have to fix gazillion pattern matching tests<p>* the tooling is just horrible, cant jump, because of pattern matching that makes it much more annoying<p>* phoenix was complete misfit for us as well, so i ended up hating it for no reason<p>so because of no-tooling and on-refactoring, accidental complexity only grows, and we ended up with much more fragile system with infinite failure domain.<p>i wrote briefly about why it was chosen at <a href="https:&#x2F;&#x2F;eng.rekki.com&#x2F;kitchen&#x2F;kitchen.txt" rel="nofollow">https:&#x2F;&#x2F;eng.rekki.com&#x2F;kitchen&#x2F;kitchen.txt</a> and why we moved to go.<p>that being said, i am sad that this was my first real world experience with elixir, in a project where it was not a good fit, so now i am totally biased against it. when i tried it briefly for few hobby projects it seemed like a quite cool language.<p>-b
0pethalmost 5 years ago
A language is a tool. You are right with your analysis about the 3rd party libraries, it will absolutely slow you down.<p>Elixir is an okay language at best, if you look at it in comparison with let&#x27;s say Python:<p>1. It is not any safer than python 2. Not any faster than python 3. Abstracts away a lot of things away from you &quot;magically&quot; just like python 4. It is harder to read elixir cause you will have people writing all sorts of random macros.<p>Where Elixir is good: 1. Concurrency (Processes!) 2. Based on BEAM but you won&#x27;t care for your simple API project and you shouldn&#x27;t have to. 3. Other erlang goodness supervisors, otp etc.<p>Personally I detest Python, but you would be better off writing your app in Python cause using Elixir you have gained nothing much substantially but lost on all ecosystem and community support Python has gained in its long history.<p>As a sidenote, I hope you use a strongly typed language.
rubyn00biealmost 5 years ago
I&#x27;ve seen places regret Elixir, usually the following issues cause the biggest regret:<p>1. Hiring. Generally speaking, finding experienced Elixir engineers is not cheap nor easy. Also, chances of finding someone willing to work in an office is even more slim (very remote heavy talent pool)...<p>2. Deployment&#x2F;monitoring. Shipping your first Elixir application to production will likely be one giant act of frustration if you&#x27;re used to Ruby or other scripting languages. Compile time vs runtime settings and environment variables are a HUGE gotcha. Also, as fate would have it, BEAM is more like an operating system than a simple runtime and thinking you can toss it into container and be off to the races is a recipe for disaster. Hope you didn&#x27;t want to use distributed Erlang... (though this has gotten better recently, tbh). A lot of common monitoring tools and methodologies have to be thrown out the window because of how BEAM works internally (there are great ones to accomplish most anything, but its just more to learn).<p>3. Distributed systems, make for distributed problems. Yes, Erlang&#x2F;Elixir and BEAM give you some fucking amazing tools to build distributed systems... that doesn&#x27;t make building distributed systems themselves &quot;easy&quot; or &quot;quick.&quot;<p>4. Performance. Erlang&#x2F;Elixir will probably take a hot-fast shit on most scripting languages when it comes to network requests; however, if you need to do any long-running number crunching or complex string manipulation, you&#x27;d be better off almost anywhere else. This could also be categorized as &quot;use the right tool for the job, dummy.&quot;<p>5. Learning curve is real and vastly underestimated. You aren&#x27;t just learning a language, you&#x27;re sort of embarking on a quest to learn a new paradigm. Erlang&#x2F;Elixir, BEAM, and OTP (I&#x27;m going to refer to them as the &quot;Triforce&quot;) were designed together to solve a specific set of problems. The Triforce has been in-use, 24&#x2F;7, 365 days a year, for 30 years, in real, critical, production systems. If you ever wanted to learn the &quot;Actor&quot; pattern, BEAM is the most <i>metal</i> implementation I know of... Also, really sit down and make sure you understand it&#x27;s all &quot;non-blocking&quot; thanks to the scheduler being able to pre-empt processes.<p>----<p>With regards to 3rd party libraries, I find in Elixir and Erlang, I need and use way less of them... BEAM and OTP give you soooooooo much it&#x27;s kind of absurd how little you end up missing or wanting.<p>----<p>Lastly, while a lot of the success stories here are great to read, a lot of them have bad code, or things that are just silly to the trained eye. And that&#x27;s totally okay, the authors are learning, we all have do it, but I&#x27;d probably not recommend the code as study material. In general, try and find examples from people who have seem to have been using it for a few years.<p>----<p>Addendum (via edit):<p>FWIW, I&#x27;ve been writing Elixir for about six years now (just checked some commits), and have been employed full-time writing Elixir for five of those. I wrote Ruby before that, and have never looked back... If you want my number one selling point to any Rubyist :trollface: (but also very real), is in Elixir a &quot;horrible, slow, wretched monolithic test suite&quot; still will take less than 90 <i>seconds</i> to run.
fogfishalmost 5 years ago
I would recommend Erlang over Elixir. Rubyish syntax and leak of Erlang abstraction is a tough combo.
samtechiealmost 5 years ago
I have been using Elixir for about a year and the only problems I have found is the much smaller ecosystem. It&#x27;s still a niche language. This means you may be the first one to encounter some problems although I have found the community quite helpful. Even if the number of libraries cannot really stack up to Rails the few libraries tend to be high quality. Overall, I find things more explicit and understandable. There&#x27;s a lot less magic and I find functional code easier to reason about. At the end of the day, every popular language was niche at one time but some people took a chance on it. Maybe Elixir hasn&#x27;t yet gone mainstream but its a fairly healthy ecosystem with many brilliant, passionate people.
qgadrianalmost 5 years ago
I don’t, I’ve being pushing everywhere I go to use it.<p>The main question is always the same, “how much effort it will take me to find Febe if I need them”.<p>And my answer is always the same, “make them come and work with you, and focus people excited and open to learn a new technology”.
joelbluminatoralmost 5 years ago
I think a big question is how much you like functional programming, afaik you&#x27;re not in OOP land anymore with Elixir. That&#x27;s a very big mind shift and might be a bigger consideration than even community size or ecosystem.
PopeDotNinjaalmost 5 years ago
I love Elixir, but I found the learning curve to be very steep for non-web use cases. It&#x27;s just different than anything else, and other than syntax, I&#x27;d argue it nothing like Ruby.
s1gs3gvalmost 5 years ago
You might also ask &#x27;Who regrets not choosing Elixir&#x27;.
nickjjalmost 5 years ago
I really like Elixir and want it to be even more popular than it is but...<p>My only real complaint with Elixir (and this covers Phoenix and Live View too) is that things tend to get announced WAY before they&#x27;re anywhere near being production ready, so you may find yourself postponing building anything because you&#x27;re waiting for the announced thing to be ready to use.<p>For example Live View was talked about in the later months of 2018 but there&#x27;s still some things missing today that make it pretty sketchy to really use it in a non-trivial production app, and the docs leave much to be desired. Things like LV based file uploads as being part of the library was in the &quot;near future&quot; or &quot;on the horizon&quot; a year ago, etc..<p>I only spent a weekend using it for a project to play with about 6 weeks ago and ended up uncovering some bugs and even some feature requests that quickly ended up making its way into the master branch of LV after reporting them. But these are for things that seemed very basic to me in the sense that if the folks who were developing it were using it in larger production apps, there&#x27;s no way those things wouldn&#x27;t have made it into the library sooner.<p>In other words, I don&#x27;t feel comfortable or confident at all to use it in production because I&#x27;m afraid if I spend some real time working with it, I&#x27;m going to end up being patient zero for so many bugs and edge cases. I want to focus on building my apps and trust the libraries I use, not be a pioneer (software is already difficult enough without bugs!).<p>On the flip side, Rails is a champion here and IMO it&#x27;s very much why it&#x27;s so popular and will remain popular 5 or even 10 years from now. It&#x27;s because most of the things in Rails come from tech focused businesses using it to drive their services and the core team also use it to drive their business. Everything feels like it&#x27;s really battle hardened, production ready when features are talked about and was carefully designed based on months of real world usage.<p>With Elixir, Phoenix and LV that feeling isn&#x27;t there -- at least not to me. It sort of kind of feels like the libraries are being built from a theoretical point of view. I mean, I know the creators of those libraries do consulting work, but it&#x27;s super behind closed doors. There&#x27;s never any talk about what drives the development of practical features and it&#x27;s kind of a bummer to get glimpses of things on the horizon, but then years later they aren&#x27;t ready for production.<p>That&#x27;s the thing that worries me about the future of the ecosystem. I also think it&#x27;s partly why it hasn&#x27;t exploded in popularity. It&#x27;s a nice ecosystem for sure, but it&#x27;s missing critical components for it to be adopted by the masses.<p>That and I think generally speaking the language is very hard to pick up. I know I struggle hard with Elixir with ~20 years of general dev experience across half a dozen non-functional languages before touching Elixir. I still feel like I have trouble reading Elixir code I&#x27;ve written 2 months ago when it uses some &quot;real&quot; functional bits that I had to ask for help on.<p>I often feel like I hit 100% dead ends and have to ask another human for help. I don&#x27;t think I would be using the language if it wasn&#x27;t for the IRC &#x2F; Slack channels. There&#x27;s some folks going above and beyond to help people out there, including Jose himself (the creator of Elixir).<p>With Python and Ruby I rarely encounter situations where I had to ask for help like this. Google always had the answer for everything I couldn&#x27;t figure out based on tinkering and reading the docs.<p>It&#x27;s not just due to less blog posts existing for Elixir &#x2F; Phoenix too. It&#x27;s the language overall. I want to love it, but for whatever reason my brain won&#x27;t accept it naturally. I get hung up so frequently. I know this is just my brain being an idiot, but I do wonder if anyone else feels the same.<p>My gut tells me yes because otherwise the language would already be one of the most popular choices for building web apps. There&#x27;s a lot of great things surrounding the language.
hartatoralmost 5 years ago
I’ve played with Elixir&#x2F;Phoenix a little bit and was not very happy with a few things:<p>- Debugging is hard. You can’t throw a REPL wherever your want in your code and pipe states are hard to inspect.<p>- Serving static files in Phoenix is oddly super hacky.<p>- Deploy is hard. Mostly by the lack of support out there in term of documentation and services.
评论 #23285923 未加载
评论 #23285915 未加载
评论 #23287362 未加载
59nadiralmost 5 years ago
I&#x27;ve used Elixir since 2015 and I find Elixir to be unusable for any kind of intelligent domain modelling, but that&#x27;s primarily because it&#x27;s dynamically typed and has no concept of real sum types, etc., not necessarily because it&#x27;s any worse at this than Ruby.<p>Any codebase beyond fairly small will be harder and harder to work with to an unreasonable degree, in my experience, and any perceived &quot;velocity&quot; gained from the dynamic nature of it is paid for doubly so by the lack of safety you get beyond toy projects.<p>I&#x27;m only slightly more for Erlang as a choice mostly because it&#x27;s simpler than Elixir and doesn&#x27;t have as much obfuscation of logic added to it that Elixir does, but in reality it&#x27;s also a bad choice for any bigger system. The runtime is absolutely great, but the languages on it are generally not good enough.
评论 #23284078 未加载
评论 #23284430 未加载
Ceezyalmost 5 years ago
The worst part of elixir is Jose Valim. Like the worst part of linux is Linus Torwald...
评论 #23290527 未加载
danbmil99almost 5 years ago
Go with Django. Save yourself a lot of pain
评论 #23284549 未加载
评论 #23285513 未加载
sergiotapiaalmost 5 years ago
Here&#x27;s some Elixir negatives from someone who&#x27;s worked with it for four years, nearing five, and currently director of engineering at a startup where we use Elixir for 100% of backend code.<p>1. Expensive to find talent. 2. Deploy story was kind of shit until recently with mix release. 3. In Rails or .NET you can find a package for literally anything you can think of. In Elixir-land, it&#x27;s not 100%. It&#x27;s more like 80%. One example, there&#x27;s a Twilio elixir lib, but bad luck one of the calls we need isn&#x27;t supported by the package. In rails it&#x27;s all supported.<p>---<p>But on the other end of this, it&#x27;s all rainbows and happiness. It&#x27;s fast, predictable, boring. I love that about the language.<p>I still use Nim for hobby projects, but anything professional I will write in Elixir.