TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: Are you satisfied with Elixir or do you regret choosing Elixir?

387 点作者 sdiw将近 4 年前
I'll be starting to work on a new project from next month and I've been reading all but good news about Elixir. I have talked to people in real life, most of the devs had positive things to say about it. Does anyone have any arguments against selecting Elixir? Question coming from RoR developer.

77 条评论

midrus将近 4 年前
My company is moving away from it. We built a few services but after a few years some of the original people that introduced it left the company and it became very difficult to hire for. New hires were either people wanting to learn (so we had to spend a good bunch of resources into teaching + end up with a system built by noobs to the language) or very expensive developers with a lot of experience in erlang and elixir.<p>We also found many times missing libraries, or found libraries which are incomplete, or unmaintained or just not well documented. Just compare the total amount of libraries in Hex, vs the total amount of libraries in rubygems. Somebody will say &quot;but Elixir libraries are higher quality so we need less, etc,etc&quot; as if there were not good developers in the ruby world and every elixir developer were a rockstar.<p>Tooling is just terrible. The VSCode plugin is crap, kills the CPU unless you disable features. There is no IDE from jetbrains. There is a plugin but last time I tried it, it was even worse than the VSCode plugin.<p>Also, I&#x27;ve read some comments where people mention &quot;we don&#x27;t need redis&quot;, &quot;we don&#x27;t need workers&quot; everything is so much easier. That was our thinking at first. But then you realize on deployments you will lose your cache, or your background jobs, etc. So you have to persist them either in mnesia or in the database. At that point you&#x27;re just reinventing your crappy undocumented and untested version of delayed_job.<p>Most of what you get from elixir in terms of redundancy, high availability, etc you can have that anyway from kubernetes, heroku or any PaaS.... you will need more than 1 server anyway, so...<p>Liveview sounds amazing until you try to use it in the real world. The most minimum latency kills the experience.<p>In the end, we are back to Rails and much happier. Specially now we are using all the hotwire stuff. Not fancy, and not fashionable though.
评论 #27193938 未加载
评论 #27193694 未加载
评论 #27195827 未加载
评论 #27194283 未加载
评论 #27195721 未加载
评论 #27193712 未加载
评论 #27194237 未加载
评论 #27194085 未加载
评论 #27193847 未加载
评论 #27195000 未加载
评论 #27194379 未加载
评论 #27194312 未加载
评论 #27204091 未加载
评论 #27196345 未加载
评论 #27212621 未加载
评论 #27194497 未加载
评论 #27195685 未加载
评论 #27207615 未加载
评论 #27194523 未加载
评论 #27193879 未加载
dorian-graph将近 4 年前
I&#x27;m at a relatively early stage VC-backed startup and from day 1 it&#x27;s been written in Elixir. It was a fantastic choice, for many reasons, with some being:<p>- Elixir is good for just getting stuff done. I came from a previous startup that used Go and Elm.<p>- The community isn&#x27;t as small as people make it out to be, or, it&#x27;s quality over quantity. ;)<p>- There&#x27;s a lot of good modules out there, and if you need to write your own, it&#x27;s easy and there&#x27;s well-defined patterns. E.g. I recently improved our internal Zendesk client and it was a breeze.<p>- <a href="https:&#x2F;&#x2F;dashbit.co&#x2F;" rel="nofollow">https:&#x2F;&#x2F;dashbit.co&#x2F;</a> for paid support&#x2F;advice is amazing.<p>- The console for experimentation, debugging, inspection, etc. is fantastic.<p>- The let it crash, and other Elixir&#x2F;Erlang philosophies, have been very helpful.<p>- There&#x27;s a solid amount of batteries-included, but not in an overbearing&#x2F;restrictive way.<p>- It&#x27;s such a pleasant day-to-day dev experience.<p>I didn&#x27;t know Elixir before joining this startup. For myself, and workmates who also didn&#x27;t have prior experience, it&#x27;s been a breeze to get up to speed in.
评论 #27195069 未加载
phtrivier将近 4 年前
It&#x27;s not argument &quot;against&quot; selecting it (it&#x27;s a free world, and mileage vary), but a couple of scar-earned advice:<p>- Be careful about libraries. If you know that your system has to interact with X, don&#x27;t assume that there is a running, idiomatic, maintained libary for X on `hex.pm`. Do a bit of due diligence. We had experience ranging from `meeh` (oauth2, graphql, http) to `pretty bad` (mqtt, swagger.)<p>But as other say, if you&#x27;re doing vanilla Phoenix&#x2F;Plug&#x2F;Ecto with exactly the right kind of DB, you&#x27;ll should be ok.<p>- Give a little though about how you&#x27;ll be deploying and operating. `releases` and `configuration` haved changed in pretty big ways in the past (<a href="https:&#x2F;&#x2F;elixir-lang.org&#x2F;blog&#x2F;2019&#x2F;06&#x2F;24&#x2F;elixir-v1-9-0-released&#x2F;" rel="nofollow">https:&#x2F;&#x2F;elixir-lang.org&#x2F;blog&#x2F;2019&#x2F;06&#x2F;24&#x2F;elixir-v1-9-0-releas...</a>), the ecosystem is constantly in flux (`config.exs` vs `Application.get_env` vs ENV_VAR vs..) . Plus, the erlang virtual machine (BEAM) has knobs that are not always easy to play with. And if you hide it behind, say, docker containers, you&#x27;ll have other troubles. Don&#x27;t expect an `heroku do-some-magic` experience.<p>- Unless you&#x27;re familiar with the Actor Model already, and your application is very simple, expect a learning curve made of:<p><pre><code> 1. A period where you&#x27;re afraid of GenServer and fail to do anything because you don&#x27;t want to create a supervision tree 2. A period where you think you&#x27;ve understood GenServers and you create GenServers like crazy 3. A sobering period where you don&#x27;t understand anything about your application 4. A couple of refactorings where you move the pendulum until you reach something that&#x27;s acceptable </code></pre> - Finally, you&#x27;re coming from RoR, so you&#x27;re probably fine with not having static types anyway ; may St Isidore help you ;) There is a thing called `dialyxir`. It might help a bit ; It will disappoint a lot.
评论 #27194928 未加载
评论 #27194277 未加载
评论 #27193263 未加载
评论 #27193475 未加载
评论 #27193229 未加载
评论 #27194542 未加载
samgranieri将近 4 年前
I’m very satisfied with Elixir. I, a longtime Ruby on Rails developer, learned Elixir on the job at CityBase and have been thrilled with it every day.<p>The first thing that tripped me up with Elixir is the difference between single quoted and double quoted strings. They’re different data types!<p>Most of the work I’ve done has been writing JSON or GraphQL apis that react apps consume. We’re about to start using Phoenix LiveView.<p>I like using Phoenix + Ecto. It’s lightweight and very fast. I learned Ruby through my work with Rails, and I did not have the same experience with Phoenix. And that’s for the better.<p>Deployment-wise, we moved from Edeliver to Kubernetes and it’s worked great.<p>I need to figure out the right editor experience for NeoVim, I haven’t gotten an LSP to work just right. Sometimes Dialyzer is a pain in the ass. Also, I’ve had some issues installing erlang via ASDF lately and sometimes I’ve had to use homebrew symlinks to skip that problem.<p>I recommend that OP give Elixir a shot and see what you think. There’s also very nice community on the Elixir language slack server.
gamache将近 4 年前
I&#x27;m about six years in with Elixir, five years in production at Appcues. I have no regrets at all -- Elixir and the BEAM have been fantastic. It is convenient to write very scalable and stable systems that operate in soft real-time, which is what I do for a living, so I have warm feelings.<p>Previously I wrote Scala for a few years, then RoR for a few years before that, following about a decade of Perl. I recommend you try Elixir.<p>Anyone complaining about a talent pool is focusing too hard on prior Elixir experience. We hire backend engineers and teach them Elixir. This has worked out great so far, especially now that we&#x27;re a fully remote business and are no longer as constrained by geography.
atonse将近 4 年前
We chose elixir in 2016 for our product and never regretted it.<p>Apart from application bugs we’ve caused, it just keeps chugging along and working beautifully. It’s never once been the bottleneck in our stack.<p>Finding people has not been tough at our scale, and they’ve been good quality.<p>We are just scratching the surface with OTP. And between that and the data processing tools, we know we can handle pretty much any scale.<p>Deployment is nearly as crude as it was 5 years ago though. We use distillery and edeliver. We are moving to docker containers soon.<p>We use Exq for background jobs and have processed 75 million in a year without a sweat (most of that in the last two months). We handle 55 million requests per month on t3.mediums. We are looking to switch from Exq to Oban but I’m nervous about whether Oban’s Postgres based architecture will handle it. It’ll probably be totally fine.
评论 #27193690 未加载
评论 #27193878 未加载
aczerepinski将近 4 年前
I love Elixir. But…<p>Five years ago I spent time learning Elixir on the side thinking I was investing in an upcoming technology that would pay off for me financially. I eventually built some services in Elixir at work and really enjoyed it. They performed well but the language didn’t catch on with the rest of the team.<p>However, five years later the mainstream languages (Ruby, Go) are still paying more. I still get recruiter messages for Elixir jobs offering less than market value but I haven’t used the language in over a year.
评论 #27196260 未加载
评论 #27194343 未加载
grumpy-de-sre将近 4 年前
As an SRE who has had to baby sit production elixir apps I&#x27;d highly recommend first having a talk to your operations guys. I&#x27;ve never had a more challenging system to debug and keep running.<p>It&#x27;s only a matter of time until you hit something as confusing as <a href="https:&#x2F;&#x2F;elixirforum.com&#x2F;t&#x2F;dbconnection-connectionerror-pid-xxx-exited-for-some-sql-queries&#x2F;27478&#x2F;4" rel="nofollow">https:&#x2F;&#x2F;elixirforum.com&#x2F;t&#x2F;dbconnection-connectionerror-pid-x...</a>
评论 #27193899 未加载
评论 #27292474 未加载
评论 #27215591 未加载
stefanchrobot将近 4 年前
Very satisfied with Elixir! I think it just fits my way of thinking. I love the terse, but explicit code, the VM, OTP, pattern matching, working with immutable data, integrated tooling, documentation support. The community is great, too.<p>The popular packages are top-notch, but as others have said - there might be issues finding what you need. My personal experience seems to be the opposite though - when going from Elixir to Ruby, it turned out that some of the gems were really, really far from perfect.<p>In terms of deployment, my take is that the community has finally figured it out. Elixir is a compiled language, so there is a build-time configuration and runtime configuration and I think it&#x27;s best to keep the two separate, which is now well supported by the new runtime config (Elixir &gt;= 1.11). Mix releases + runtime.exs + Docker works for me perfectly.<p>If you&#x27;re coming from RoR, you&#x27;ll be able to pick up Phoenix really quickly. It draws a pretty clear line between your web layer and your business&#x2F;app layer though. Writing controllers and views should be similar, but I&#x27;d suggest spending some time on Ecto - it&#x27;s quite different from ActiveRecord (in a good way, IMO).<p>One thing I&#x27;m missing in Elixir is optional static typing akin of TypeScript, but that&#x27;s not coming anywhere soon. Other than that, no regrets.<p>I got introduced to Elixir in 2015 and was trying to work with it full-time since then. I was able to get a full-time Elixir job and I&#x27;m really happy about that. If you&#x27;re looking for opportunities, I&#x27;d suggest attending ElixirConf or ElixirConf EU - last year I got 5 interesting job opportunities from ElixirConf EU alone (it was a virtual event, so the ticket was cheap).
评论 #27196038 未加载
评论 #27194079 未加载
scottmessinger将近 4 年前
We adopted it 4 years ago and love it.<p>As for training people, I taught my non-technical co-founder Elixir for some backend scripts he needed to write. He found it much simpler to pick up then Javascript or Ruby and his code was idiomatic rather quickly.<p>As for the IDE support in VSCode, I&#x27;ve found ElixirLS[1] great. I do have to restart it sometimes (delete the .elixir_ls folder), but that&#x27;s a small cost to pay for a pretty great experience.<p>After spending years in RoR in multiple code bases, I find Elixir code bases to be easier to debug and libraries easier to grok. Without the mutable state of OOP, I don&#x27;t find myself asking, &quot;Where is this state coming from and when&#x2F;how was it set?&quot; Of course, macros can be hard to follow, but I still find an Elixir library more straight forward than a Ruby one.<p>We&#x27;ve also experience the great performance and reliability shared by others on this<p>We haven&#x27;t had difficulty finding the right libraries even though the ecosystem isn&#x27;t as mature as Ruby or Javascript.<p>[1] <a href="https:&#x2F;&#x2F;marketplace.visualstudio.com&#x2F;items?itemName=JakeBecker.elixir-ls" rel="nofollow">https:&#x2F;&#x2F;marketplace.visualstudio.com&#x2F;items?itemName=JakeBeck...</a>
评论 #27198525 未加载
mattbaker将近 4 年前
It’s honestly been one of the smartest choices we’ve made. We’ve been running it for four or five years now. It powers high throughput systems and those systems are classified as critical (if they go down, most of the product goes down.) Not a single regret.<p>New hires new to Elixir have spun up on it very quickly, in my opinion what a team needs is one or two people experienced in Elixir to give some initial guidance but you don’t need a staff of experienced Elixir engineers to do great work. I have not found it a hard language to teach.<p>Personally I’ve found the library ecosystem very strong, and writing our own libraries has not been hard. It’s important to note that interop with Erlang is quite good, so you have access to decades of library development from the Erlang ecosystem in addition to libraries written in Elixir.<p>The basic elements you’re given out of the box for handling fault tolerance and concurrency are graceful and intuitive. The performance has also deeply impressed us.<p>On a personal level, it’s also the most enjoyable language I’ve worked in and I’ve had very good experiences with the community. I find the tooling very good, including the VSCode extension (I have contributed a few features) but the default dialyzer setting definitely does hog the CPU on first build. I disabled it since we don’t get much out of it.<p>I’ve built and run software in production in a lot of different languages over the last 15 years. Nothing has compared to Elixir, not even close.<p>YMMV, I’m not here to refute the experiences of others, I’m just here to say for <i>us</i> it’s been an incredible experience. Absolute joy to use.
toolz将近 4 年前
4 years of writing elixir professionally and I have yet to enjoy a language as productive as elixir.<p>Everything from ecto, and branching logic by pattern matching function signatures to the easy composition and cohesive community around the amazing tooling (mix&#x2F;hex) and testing. Plenty more I love for productivity<p>But because of OTP and it&#x27;s capacity to scale and distribute computation I thoroughly stay loving how deep the topic is and how there&#x27;s always more to learn.
bandris将近 4 年前
If you invest time learning Erlang everything around Elixir will make sense and it will be a pleasant experience not only to &quot;write&quot; but to test, debug and maintain as well. I would go through this slightly dated but gentle introduction before learning Elixir: <a href="https:&#x2F;&#x2F;learnyousomeerlang.com&#x2F;content" rel="nofollow">https:&#x2F;&#x2F;learnyousomeerlang.com&#x2F;content</a><p>Thinking in processes and knowing&#x2F;using the GenServer abstraction is the core of Elixir programming.<p>So, one negative is that difficult to use without Erlang knowledge. Also some good libraries are Erlang only for compatibility&#x2F;historical reasons.
评论 #27194287 未加载
评论 #27214505 未加载
bluevlah将近 4 年前
Outstanding work from the Elixir team. Very good community in the forum.<p>It’s winter of elixir land. The hype cycle has died. If I have to start a project I will think twice unless it really needs distributed system.<p>My personal opinion - talent pool, plugins and ecosystem is kind of stagnated. First talent pool is really limited and not readily available. Very few companies use elixir in production. More hobbyists in the community than people who actually use it.<p>Hex has a lot of plugins which are not updated from long. For many there won’t be a plug-in. You have to write it from scratch.<p>In Phoenix, they are reinventing magic with LiveView.<p>Few guys who do elixir consulting gain most from the ecosystem.<p>As a developer if I have to invest my time learning a new language, I would choose rust or Go.<p>As a company if I have to start a project, I will check whether I have a requirement of distributed systems.<p>PS: I have used elixir for past 5 years in production.
评论 #27193402 未加载
travisgriggs将近 4 年前
I&#x27;m currently learning Elixir and I&#x27;m loving it. I&#x27;m in that got 30% of my app written in it place.<p>I may or may not regret using it in the big picture (libraries, esoteric ness, performance, a 5th language&#x2F;platform in our soup of tech we use to solve our problem, etc, and who knows) eventually; it&#x27;s too early for me to tell.<p>But I wont regret learning Elixir. There&#x27;s a certain zen in the &quot;ah so you&#x27;re a programmer, eh? But can you do it without any references&#x2F;pointers or for loops, huh?&quot; This from a guy who spent 20 solid years as an &quot;objects all the way down&quot; smalltalker, and does a lot of multi paradigm hybrid Python&#x2F;Kotlin&#x2F;Swift these days with a bunch of C as well.<p>What I really noticed last week when I did a day of Python after a week of Elixir is how much time I spend in other languages writing branch logic code. Code where you decide what direction your code should go next. Should it do this or that now. Or if it should optionally do that. I&#x27;m writing an order of magnitude less of that code (it moves to a more orthogonal place in multi function matching) in Elixir. It&#x27;s stretching me and I&#x27;m learning new ways of seeing things that ultimately make me a better programmer; the slack channel has been really nice.<p>I tried Haskell to try and get the taste for pure functional a year ago; it did not go anywhere near as well as this.
mrjoelkemp将近 4 年前
1.5 years in and Phoenix Liveview is perfect for internal webapps. Have personally seen development take half as much time with half as much people compared to traditional stacks. You don&#x27;t need super rich interactions nor offline mode for internal apps, plus they might be harder to prio against customer-facing feature work. Elixir and LiveView are really powerful tools to have in your toolbelt. Even if you can&#x27;t use Elixir, look at Hotwire or Livewire for a similar programming model. You won&#x27;t get zero-setup fault tolerant components (nested LiveViews can crash and not take the entire page with it, and retry side effects automatically), but you&#x27;ll still cut out the JS side of the development.<p>And we haven&#x27;t even spoken about an app-aware repl that lets you manipulate&#x2F;inspect your running app (even in prod). There are so many game-changing layers in this stack. It&#x27;s hard to beat once you&#x27;ve explored it.<p>Very happy customer here.
dugmartin将近 4 年前
I&#x27;ve had an niche event ticketing Elixir&#x2F;Phoenix app in production for 4 years and have had next to zero problems. It gets very bursty traffic (100s of simultaneous users when an event opens for ticket purchases with load quickly tapering off in a negative exponential distribution) and the load average barely changes with insanely fast responses on a $10 VM.<p>I think the only downside for me is having to squint sideways to figure out how to convert a complex SQL query into Ecto. I&#x27;ve been writing SQL for almost 30 years and I find myself dropping into using Ecto&#x27;s `fragment` too often. I&#x27;ve been meaning to pickup &quot;Programming Ecto&quot; to educate myself more (<a href="https:&#x2F;&#x2F;pragprog.com&#x2F;titles&#x2F;wmecto&#x2F;programming-ecto&#x2F;" rel="nofollow">https:&#x2F;&#x2F;pragprog.com&#x2F;titles&#x2F;wmecto&#x2F;programming-ecto&#x2F;</a>).<p>I&#x27;ve done my share of RoR apps too and the nice thing about Elixir is there is very little magic and what magic there is (mostly via macros and code auto added via a `use` statement) can be seen and changed directly in your code instead of being hidden in some gem somewhere.
评论 #27193688 未加载
评论 #27248686 未加载
cultofmetatron将近 4 年前
I&#x27;ve been programming in elixir for 5 years now.<p>Currently on my 3rd year as CTO of a startup. I chose elixir for the greenfield project because we wanted realtime sync for all devices and the smaller projects I worked on before in elixir went off without a hitch. I also found its concurrenly handling and performance far superior to node and I was producting far less bugs due to its functional nature.<p>3 years in and I&#x27;m very satisfied. There are a few epics we took on that would have been much more expensive to do in go or node. For example, we made a partnership with a credit card device terminal. Their interface required one persistent webocket connection per restaurant. IN another language, I would have had to coordinate with my devops guy to have a dynamic system to allocate a process for each of our accounts and route that to our devices. The intended use case were on premise POSes so our cloud based solution wasn&#x27;t somethign they had planned on supporting.<p>Anyways, I was able to configure horde and a dynamic registry to boot up a process for each active account and automatically resserect on crash. Since pubsub is built in, It was easy to pass along data from it to all the devices over the channels interface. Best part is it was all doable within the code base running without any changes to out deployment.<p>Overall, I&#x27;ve been happy with elixir. the only bg downside is its gotten a bit boring. Things just work which leaves me spending time on rust in my free time when I want a challenge.
sb8244将近 4 年前
I&#x27;m very bullish on Elixir as a language, but I temper that with the reality that I don&#x27;t think it will become a mainstream language (in the next few years, at least).<p>I picked up Elixir probably 4-5 years ago when a co-worker kept recommending it and wanted to explore it more. We finally got the approval to do a microservice in it that was well-suited for it. Over time it became one of the two &quot;blessed languages&quot; alongside Ruby, and was probably adopted by 40% of teams. Our monolith was still Ruby, so a lot of teams had to use Ruby.<p>I found that people could pick up the <i>language</i> fairly quickly, but it would take a few stumbles on OTP before things started to click there. People generally seemed to like learning it, though. Maybe they were just being polite.<p>For me, Elixir has been the most fun I&#x27;ve had programming since I started. It allows me to more consciously design my systems because I don&#x27;t really feel limited by it—this is why I&#x27;m bullish on the language. I enjoyed programming in Ruby, but felt limited to doing things a certain way.<p>There&#x27;s also still a ton of opportunity in the community (which is excellent as it is, imo). For example, I wrote a book with Pragmatic that I don&#x27;t think I would&#x27;ve been able to write in the Ruby world. If you&#x27;re the type of person who likes exploring, figuring things out, and documenting afterwards, then you could make a nice name for yourself in the community.<p>Hiring is still a bit rough. If you&#x27;re trying to scale to 50+ engineers then you&#x27;re going to need someone skilled in training to bring the team up. Throwing them into the deep end won&#x27;t work. I think smaller teams should generally not have as big of a problem? I&#x27;m curious to see how my former employer will maintain Elixir—grow or shrink adoption—over the next 2 years.
评论 #27198668 未加载
minhajuddin将近 4 年前
I&#x27;ve been using Elixir&#x2F;Erlang for more than 6 years and absolutely love it. The community is a lovely place to be, tooling is great. Concurrency is awesome. Erlang is battle tested. If you are building applications that have anything to do with networks, you&#x27;ll be able to build some seriously performant apps without having to reach for other tools and I love the community&#x27;s focus on performance.
H12将近 4 年前
Unfortunately I can&#x27;t comment on production Elixir use (yet), but as a proffessional Ruby engineer of 6 years and an Elixir hobbiest of 3, I think that Elixir&#x27;s biggest drawback is its deceptively high learning curve.<p>The learning curve is &quot;deceptive&quot; because the Elixir syntax is very easy to pick up for someone familiar with Ruby and, once you get over the functional &quot;gotchas&quot;, you can feel productive very quickly. Especially-so given how much you get out-of-the box with a standard &quot;mix new&quot; project.<p>The learning curve is &quot;high&quot; because in order to actually write Elixir in a way that scales well in prod, you&#x27;ll need to get comfortable with Open Telecom Platform principles like GenServer and Supervisors, which will likely feel very foreign at first.<p>For any Rubyist working in Elixir, if you encounter a situation where your Ruby brain wants to start browsing Hex for a library, you should probably answer these two questions first:<p>1. Can we do this easily with GenServers? 2. Is there an Erlang standard library module that already does this?<p>Conversely, if you jump in expecting to rely on Hex the same way you rely on Rubygems, you&#x27;re in for a bad time.<p>Ultimately, I think you really need someone (ideally two someones) who is comfortable with the Actor Model and OTP in order to use Elixir successfully at a business.<p>But if you can build that solid OTP foundation for your project, there&#x27;s a decent chance you&#x27;re in for a good time.<p>The real-word business cases provide some encouraging examples of that: <a href="https:&#x2F;&#x2F;elixir-lang.org&#x2F;cases.html" rel="nofollow">https:&#x2F;&#x2F;elixir-lang.org&#x2F;cases.html</a>
shakow将近 4 年前
I have been using it for my (modestly sized) first serious public project (<a href="https:&#x2F;&#x2F;github.com&#x2F;domovikapp&#x2F;domovik-server&#x2F;" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;domovikapp&#x2F;domovik-server&#x2F;</a>), and I have been quite satisfied with it.<p>For the pluses:<p>- the development experience is stellar (live code reload, REPL interacting directly with the running server, excellent debugger, dependencies management &amp; build system are good and can be extended in the language itself);<p><pre><code> - the integrated documentation generator is of high quality; - the performances are satisfactory (you&#x27;ll get more out of a $10&#x2F;m VPS with Elixir&#x2F;Phoenix than with RoR); - deployment is surprisingly easy with the releases system; - the language itself is quite pleasing; - the standard library is very well designed and architectured, and everything just fall in place together; - Ecto shows brilliantly how to combine high-level, ORM-like operations and low-level, close-to-the-SQL ones; - Phoenix itself is a very well though out framework. </code></pre> For the cons:<p><pre><code> - the ecosystem is still quite young and has some sharp edges and&#x2F;or missing docs; - the OTP is magic for heavily parallel workloads, but it is also quite foreign and there will be some work to grasp its inner workings; - there are some quirks in the language coming from the Erlang runtime; - I would love to have a static type system, although I see how it would conflict with the tenets of the OTP. </code></pre> So all in all I might not recommend it for a very high stakes project; but otherwise, just go for it, it&#x27;s great.
eric4smith将近 4 年前
We’ve skipped so many additional things like Redis, Memcached, Sidekiq and tons of libraries because it’s so easy to write a module to replace stuff.<p>Switched from ruby to elixir 4 years ago and the only time we touch ruby is to maintain some old system.<p>It’s so darned easy to add functionality to an exiting app that you have to be careful of bloat.<p>And the functional paradigm is like second nature now. It’s hard to go back to a non functional language.
评论 #27195569 未加载
Vosporos将近 4 年前
If you are a RoR dev, Elixir will feel like a breeze. As someone who does Haskell in their day job, I miss static, powerful type-systems.<p>That being said, the ecosystem is wonderful. Plug, Phoenix and Ecto are exceptional libraries!!
评论 #27193117 未加载
评论 #27193253 未加载
remi将近 4 年前
In 2016, we started to use Elixir as our default backend stack (from Ruby on Rails) for new projects and never looked back! We have since shipped a dozen projects using Phoenix, Ecto, Plug and Absinthe.
shepardrtc将近 4 年前
A couple of guys at my company did their first startup using Elixir years ago, but they weren’t devs so they had to contract a company to do it. They regret it now because no one at our company can work on it, and they have to rely on the contractors who charge a lot. Sure someone could learn it, but we’ve got more important things to do. As much as everyone on HN loves it, you’re going to have to work hard to get others involved. It really isn’t worth it unless you want to own it for the rest of its life.
评论 #27193876 未加载
评论 #27194593 未加载
ananthakumaran将近 4 年前
We started to use Elixir around mid 2016, we were mostly using rails&#x2F;sidekiq stack at that point and started to face scaling issues with sidekiq. Moved small parts to Elixir first and then later started to use it for most of the new services. We had to create new libraries for some specific use cases. Apart from that, it was mostly smooth experience. We rarely had to tune or adjust the code for performance. Today we have a big monorepo with 20+ apps. My long term concerns are more about whether the tooling will work if we try to scale it to 100+ apps with a single monorepo.<p>We majorly depend on Plug, hackney, Exq, brod and Ecto.
sneako将近 4 年前
I have been writing Elixir full time for over 4 years now and I could not be happier with the language and surrounding community! With an incredibly small team (just myself and one colleague working on the backend), we are able to develop and operate very high throughput applications that reliably handle over 100k requests&#x2F;s (2 main web facing apps, plus a handful of supporting services). We generate millions of dollars of revenue for our customers each week, and sleep very well at night.
udfalkso将近 4 年前
I still love it a few years in. Every project I&#x27;ve used it on has worked really nicely with low resource usage and close to zero maintenance. Switching from RoR to Phoenix&#x2F;Elixir takes some learning, mostly due to the switch to functional programming, but it&#x27;s worth it imo. Everything becomes so easy to reason about, test, debug, etc. You&#x27;ll learn a lot from it and become a better developer in general even when going back to ruby&#x2F;python afterward.
thijsvandien将近 4 年前
Highly relevant thread from less than a year ago: <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=23283675" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=23283675</a>
brightball将近 4 年前
I&#x27;ve been writing Elixir full time since March this year and I&#x27;ve loved it.<p>Here&#x27;s a few of the highlights for me:<p>1. It makes me want to write more tests.<p>In other languages, I always defaulted to opening up a terminal to quickly hammer out something before implementing it and usually came back to the tests as an after thought. Sure with an IDE integration you can highlight and execute just the test you&#x27;re looking at, but in many cases I found it clunky.<p>With Elixir, the entire test suite executes so fast that it&#x27;s easier and faster to just work with the tests than hammer through things in the console.<p>For the situation where the console works better, you can copy the iex lines above your method as a code comment and that will run as a test when you run your test suite (so tests as documentation essentially).<p>Lastly on the test front, the assert_value library is incredibly helpful for hammering out first versions of unit tests.<p>2. After taking the Coding Gnome course from Dave Thomas, I love the approach to code structure.<p>Dave emphasizes thinking of the functionality of your application independently from the interfaces which access it. For example, the HTTP layer, a REST API, a Websocket layer, the command line, and an IEX terminal are all different interfaces.<p>Thinking of my code that way and developing around an internal API rather than doing something like REST first testing, etc has made things a lot cleaner for me. I&#x27;m also a big fan of the defdelegate approach for that internal API layer.<p>The libraries I&#x27;ve needed so far have been really solid, but I generally don&#x27;t pull in libraries unless I really need them anyway. If I&#x27;m connecting to an API, I&#x27;d rather write the connections directly in most cases as I need them rather than pull in an API library directly for it. Gives me more control and better understanding of things and I like that. YMMV.<p>3. Tooling wise, VSCode has been great for me.<p>I&#x27;ve considered reaching for IntelliJ with the Elixir plugin, but as it stands right now I&#x27;m very happy with VSCode. It&#x27;s been a great experience and all that I need on a day to day basis.<p>There&#x27;s a lot more to say than that, but these are my biggest things that I&#x27;m liking so far.
ollysb将近 4 年前
Been building backend systems for nearly 20 years in Java&#x2F;Ruby&#x2F;Elixir. Elixir is by far the most productive language&#x2F;ecosystem that I&#x27;ve used. I&#x27;ve built 4 systems in the last 5 years and they&#x27;ve all gone smoothly and performed well in production. Only thing on the wish list is full static typing (there&#x27;s dialyzer which is useful but very much feels like the bolt-on that it is).
sjm将近 4 年前
I don&#x27;t use it professionally, but I built a side-project in Elixir a few years ago and was amazed at how much I was able to get done with such a little amount of code. The service is still running today with basically no maintenance. For me it was a great choice and I would totally build my next project with Elixir on the backend.
评论 #27199934 未加载
messutied将近 4 年前
I picked Elixir to develop Statuspal 4 years ago as a solo founder, I’m pretty happy with the decision so far, we’ve been in production for close that time and I feel very productive and enjoy it a lot.<p>That’s not to say we never encounter hiccups, we’ve been bitten by a few libraries getting unmaintained, a few drastic changes in Phoenix in the first years, and a hard time getting a proper deployment setup, but nowadays is much more mature.<p>Thanks to Elixir we got away with things like not needing to cache (for quite some time) with great performance and with little resources, not worrying about the app becoming slow if 6 people visit at the same time.<p>Hiring Elixir developers is not as easy as RoR devs but is doable, I had good experience in Elixir specific places like <a href="https:&#x2F;&#x2F;elixirjobs.net&#x2F;" rel="nofollow">https:&#x2F;&#x2F;elixirjobs.net&#x2F;</a> and Upwork to a lesser degree.
aej将近 4 年前
Having done python for many years and coming to Elixir the things that I find Elixir does really well are:<p>- mix and the general tooling (package management, testing, deployment)<p>- iex - specifically being able to run a shell at the same time as running my app. It makes it easy to test and explore code from the REPL<p>- documentation (both in iex and hexdocs) - Navigating Elixir documentation is standardized and easy<p>- Immutability - it took a while to get used to but now I wouldn&#x27;t have it any other way
评论 #27262831 未加载
Grimm1将近 4 年前
Very satisfied with elixir and the ecosystem is growing! There are some performance concerns if you&#x27;re doing a large amount of list or string manipulations but these are somewhat special cases and I tend to reach out to a Rust NIF to handle them which resolves the problem.
strzibny将近 4 年前
Somebody posted my post which sums up my experience a while ago[0]. In short: No regret, just make sure you are not building something that can be done twice faster with an existing Ruby library or so. But for a long-term team project, I would prefer Elixir codebase.<p>[0] <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=26702222" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=26702222</a>
jb3689将近 4 年前
The only thing I don&#x27;t like about Elixir is the fact that it doesn&#x27;t come default on most distros so to use it even for scripting I need to pull strings to get it approved. Otherwise Elixir would replace Ruby for me wholesale<p>The comparisons to Ruby are a bit superficial. Having written and then torn apart highly abstracted code in Elixir, I would always try to keep my code as low abstraction as possible in Elixir which I need not really do in Ruby. Otherwise I find debugging concurrency problems very difficult (and yes, you can still create many concurrency problems in Elixir). If you are doing single-threaded stuff, there is almost no reason to use Elixir. I do like Phoenix better than Rails, but only marginally
Communitivity将近 4 年前
There are things about Elixir I love, most of which come from the Erlang language (esp. their processes and gen behaviors). There are those I dislike (tooling is not where I&#x27;d like, tracing to underlying Erlang is hard sometimes).<p>There are projects where I&#x27;d choose Erlang or Elixir (typically M&amp;S or HPC efforts where the processes really come into play, or real-time mission critical efforts where every minute of downtime could cost lives).<p>Most other projects are based on what the shop I&#x27;m in uses, or my personal preference for the task. I&#x27;m finding I&#x27;m choosing Rust more and more, outside of my day job, which is strictly C++ at the moment (but we&#x27;re investigating Rust).
odo101将近 4 年前
I am super happy with Erlang&#x2F;Elixir, having build and run game backends, Kafka replicators, an ML platform (models in Python) and several social apps over the years. My story is a bit different but maybe interesting to contrast: I used to work with Ruby for years when I switched to Erlang 9 years ago. So for me the syntax was unfamiliar and the actor model was completely new. Elixir and Phoenix where not around so I started with processes, messages, gen_server and the like. I started building an Erlang-process load balancer, learning about mailboxes and supervision in the process. Later I switched to Elixir and felt reminded of the Ruby syntax, really liking it plus new things like the pipe operator. For me the biggest learning that needs to happen (apart from general FP) is on structuring applications. One way to think about it is having long-running micro services within the VM along with short-lived processes for small tasks like serving a single http request. I can see that coming from Ruby today and using Phoenix can give you a cozy feeling where you build stuff without thinking too much about OTP, processes and how the VM does things (scheduling, mailboxes, monitoring, GC, supervision, distribution). And I think that&#x27;s totally fine unless you want to step outside the framework and really make use of all the things that set Erlang&#x2F;Elixir apart. So maybe one way to get started today is looking at Erlang first, explicitly because it&#x27;s unfamiliar.
gideon13将近 4 年前
Corroborate the &quot;some libraries now feel unmaintained&quot; view given elsewhere. Also the language itself and best practise seems to change now quite often and there&#x27;s a bit of a tendency to do things in multiple ways through shorthand macros which can be a bit confusing (bit of the LISP problem going on here). That said the structure of my code is vastly better than when I was doing everything in Python trying to use multiprocessing and&#x2F;or threads and&#x2F;or asyncio.
spectator02将近 4 年前
Two years in, Elixir+Phoenix is an extremely productive setup for me.
dimgl将近 4 年前
So here&#x27;s my experience as a hobbyist.<p>I really enjoyed using Elixir when it gained some traction around 2017-2018 and found the language to be beautiful. The documentation is also great. Here&#x27;s a few reasons why I never kept using it for my own projects.<p>Most of the time Elixir feels like overkill. It&#x27;s easier to use Node.js or Golang to create simple services or prototypes. The mental overhead of having to go from an imperative language to a functional one is high. Once I had paid that cost and gotten over the learning curve, I found it exhausting to write and didn&#x27;t really feel like I was getting a lot of value.<p>Take BEAM processes and supervision trees for instance. Almost all of my projects are containerized, split into different services, and have some kind of redundancy on top. When I was deploying Node.js projects onto VPSs I almost always used Docker, systemd, or pm2. Once I started working with AWS regularly, I was using ECS and Lambda for everything. The ability to easily create discrete services and have redundancy for those services meant that I didn&#x27;t really get a lot of value from having this single Elixir instance that is responsible for many things.<p>Take ETS: when I started using Elixir, I already had years of experience using Redis and preferred it to most in-memory data stores. I tried to give ETS a shot but found myself wanting the Redis API over and over. Thankfully, the Redix library was excellent and had great support for almost all Redis features, but it always felt like I was using Elixir incorrectly by not utilizing ETS.<p>Some other points that have already been iterated in other comments:<p>* Packages are very hit or miss. Sometimes a package will only have an Erlang counterpart and coding efficiently becomes harder if you don&#x27;t know or understand Erlang well<p>* The IDE tooling is also hit or miss :( It sucks when your IDE starts to freeze or doesn&#x27;t understand how to autofill certain things<p>* Environment configuration is kind of a pain. In the beginning it was really hard to tell what the initial starting point of my application was and how to feed in configuration values to those different parts of my app. I wish this part of Elixir was easier.<p>* Phoenix was just too much. It always felt like a massive framework and I would rather have had something closer to Koa (Node.js) or Mux (Golang).
评论 #27196088 未加载
cavalcanti将近 4 年前
No regrets, Elixir is a great language running in a rock-solid runtime, with such a nice community around it. Recommend that you give it a try.
acconrad将近 4 年前
I run GetToKnow (<a href="https:&#x2F;&#x2F;gettoknowapp.com" rel="nofollow">https:&#x2F;&#x2F;gettoknowapp.com</a>) on Elixir.<p>It costs me $50&#x2F;mo total (app + DB) and I can easily support 20k users across 250 organizations (some of whom are paid).<p>I&#x27;m basically ramen profitable overnight and my overhead is incredibly low. It&#x27;s essentially pure profit.<p>With Ruby&#x2F;Rails this would be at least x4 the cost.
devmor将近 4 年前
I love Elixir, and personally like to use it for hobby projects, but I don&#x27;t dare to use it in anything I plan to make a big deal out of. Not because it&#x27;s bad, but because hiring another Elixir developer would be expensive as hell.<p>It&#x27;s an amazing language but it&#x27;s hard to hire for. I wouldn&#x27;t want to pay someone the kind of money I get paid for it.
te_chris将近 4 年前
We’re very happy with it, essentially using it as a full-stack front-end though, rather than whole app. This is partly due to resourcing issues, partly due to having an aint-broke don’t fix rails service that Elixir replaced part of (our CMS, specifically). I think the rails service will stay, the benefit of porting is just too low as we’re a small team.
applepple将近 4 年前
Functional programming is OK up to a certain degree of complexity... Good if you have a lot of junior developers on your team because it prevents certain kinds of mistakes which juniors tend to make. But many FP projects end up becoming a giant pile of spaghetti code eventually.<p>I think this is because FP doesn&#x27;t put emphasis on separation of concerns like OOP does. FP advocates separating state from logic as being more important than separating concerns across components.<p>With OOP, if some piece of state concerns the same business domain as some piece of logic, then they should be co-located. On the other hand, FP will happily violate this principle in favour of keeping state and logic separate.<p>Having built highly complex, modular systems with OOP, I don&#x27;t see how it would have been possible to implement these systems in such a modular way using FP... Co-locating related state and logic is absolutely essential to achieve modularity.<p>I have yet to see any complex FP system which was not spaghetti code.
评论 #27194346 未加载
评论 #27194150 未加载
moshmosh将近 4 年前
Inherited a couple projects. Was interested at first, but now dislike it. At this point I think I&#x27;m just <i>done</i> with languages that don&#x27;t have static typing. I hate having to remember or figure out things that my tools should just be able to tell me. Unproductive waste of time &amp; effort.<p>We&#x27;re not using it with Phoenix, but I&#x27;m also very, <i>very</i> done with RoR—after many years using it and getting sick of how dependably any long-lived RoR project I encountered turned into an onboarding-hell mess of &quot;WTF does this do even? Which gem is this from? <i>Is</i> it from a gem?&quot;—to which Elixir + Phoenix is often compared, so I don&#x27;t think that would improve my experience.
salex89将近 4 年前
Nice question, I&#x27;m just starting with Elixir for a side project. Has anyone else find it to have a steep learning curve? Coming from Java&#x2F;Scala and Python, I find it harder to wrap around then Scala was years ago. Shortcuts with mix like mix phx actually make it a bit more complicated for me because I&#x27;m used to understanding what is exactly happening under the hood.
评论 #27194222 未加载
评论 #27198014 未加载
评论 #27193346 未加载
mikl将近 4 年前
I’m about 18 months in, and I’m still loving Elixir.
wnevets将近 4 年前
I like the pipe syntax a lot. I dislike the fake type system, it some how the worst of both worlds. I regret having an elixir project.
jpbutler将近 4 年前
I&#x27;ve been using Elixir for 4+ years, and I&#x27;m very happy with it. I&#x27;m a one-man band, so the talent pool isn&#x27;t an issue.<p>My biggest joy is that once you get the application working, it stays working. I have ~20 production nodes, and they all just happily run. This was not my experience with Ruby and Rails.<p>It&#x27;s not fun to try to interpret Erlang crash dumps, though.
kosma将近 4 年前
We&#x27;re using in a project (through Nerves framework) and slowly walking away from it. Hiring is the biggest hurdle; our product is simple enough that we can just have a bunch of .NET backend developers rewrite everything in Elixir. Hiring a .NET person is simple and cheap; hiring an Elixir dev is impossible where I live.
mikeymikemike将近 4 年前
I work for an Elixir shop right now, and am very fresh (started a few months ago) and this is my first Elixir job.<p>My first impressions are that Elixir is different, but not necessarily better. Having come from Go, which is a very manual process, Elixir comes with a lot baked in.<p>With any niche language (which I consider Elixir to be) the benefits don&#x27;t really kick in until the last 20% of adoption. The first 80% can be done by any language, with very little deviation from the other.<p>That last 20% is ETS, OTP, and other Elixir&#x2F;Erlang-esque features, and I don&#x27;t think 90% of the companies that adopt a language really gets into that level. Kubernetes, Caching, Horizontal Scaling is now so much easier and cheaper to bring in than an expert or the investment into the language that niche languages don&#x27;t provide all that much value at this point.
bennyp101将近 4 年前
I&#x27;ve used it for a few small production APIs, as well as internal TV dashboard things - and it works great!<p>There are a few business services that I would eventually like to move to it, but I don&#x27;t have the time or resources currently. (As much as I like it, it&#x27;s quite a shift mentally)
yoran将近 4 年前
I initially wrote the backend for my current startup in Elixir, using Phoenix. As many Elixir developers, I&#x27;m coming from the Ruby and Rails world. I really enjoyed the language and there are definitely things in Phoenix that are a vast improvement compared to what&#x27;s available in Rails (changesets are awesome for instance).<p>However, after some weeks of development, I decided to move the project to Rails. We were still pre-launch so it didn&#x27;t impact any users and only took a couple of days. The two main reasons for the move were:<p>1. *Ecosystem.* The Ruby and Rails ecosystem is just so much bigger and more mature. I cannot criticize Elixir for that, I&#x27;m just stating the fact. Ruby is many years advance and that shows in the breadth and maturity of libraries and deployment options. 2. *Re-learning basic things.* I found myself needing to learn how to do things in Elixir that I fully mastered in Ruby. I had to reinvent my own wheel in a way. And when you&#x27;re trying to move fast to get your product out there, this is a waste of time.<p>In the end, I realized that for my purposes, Elixir&#x2F;Phoenix is just not 10x better than Ruby&#x2F;Rails. I can tell that learned from some of the mistakes of Ruby&#x2F;Rails and many things are better. But they&#x27;re not drastically better for the project that I&#x27;m building, which in the end is a GraphQL backend for a more-or-less CRUD mobile application.<p>Since the migration to Ruby, I&#x27;m much more productive and get things done much faster. I also spend a lot less time learning how to do X or Y. I felt relief when I didn&#x27;t have to follow the Elixir ecosystem anymore and was able to unsubscribe from Elixir Newsletter and from the Elixir podcasts.<p>I know that my move does not help my criticism that the Elixir ecosystem is too small. But I value the success of my startup more than the need to help advance the Elixir world.<p>Maybe we will suffer long-term because of this choice, although examples like Shopify, Stripe or GitHub show that you can maintain massive codebases just fine in Ruby. But at this point of our startup, time to launch and velocity pretty much beats any other criteria.
KZeillmann将近 4 年前
We tried it and moved away from it. A few reasons - one is IDE support, which has been mentioned in this thread. The other was release configuration. At the time we were working on it, it was more difficult than it should have been to use env variables at runtime (rather than build time).<p>I&#x27;m used to the Spring Boot approach - start with having different Spring profiles for different environments, and then let your secrets come in via env vars, but doing this via Distillery at the time required some hackery - they wanted you to build a QA build and a prod build, which didn&#x27;t make much sense. Maybe it&#x27;s better now, but that turned me off a lot to using it.
评论 #27196105 未加载
methyl将近 4 年前
Here&#x27;s my relevant post about choosing Elixir: <a href="https:&#x2F;&#x2F;lucjan.medium.com&#x2F;choose-exciting-technology-e735bba08acc" rel="nofollow">https:&#x2F;&#x2F;lucjan.medium.com&#x2F;choose-exciting-technology-e735bba...</a><p>TL;DR: very satisfied
chewyshine将近 4 年前
3 years in and Elixir still rocks!
eqmvii将近 4 年前
Very satisfied. Love writing it, and have seen it take root at other companies because devs exposed to it have loved it and taken it with them when they left.
haolez将近 4 年前
Not exactly on topic, but does anyone have experience with the Akka ecosystem as an option to Elixir&#x2F;Erlang? I&#x27;m considering it for a new project.
christopher8827将近 4 年前
My 2c. I was learning Elixir &#x2F; Phoenix for a startup but found it was missing way too many libraries &amp; lacked the breadth &amp; depth of the Stack Overflow knowledge base as compared to the Ruby on Rails ecosystem.<p>It was a cool experiment. Most devs would have learnt other Object Oriented Programming languages but learning Elixir would mean switching to a different paradigm.
fortran77将近 4 年前
I use Elixir and don&#x27;t regret it, but I&#x27;m still mostly in Erlang.<p>I regret &quot;Elixir&quot; the language itself. I feel they should have added a few more features to Erlang, like module parameters, and not bothered with Elixir.<p>It makes &quot;Erlang&quot; look superficially like Ruby and gets people who are ill-prepared to understand the Erlang mindset into the Erlang community.
评论 #27195284 未加载
评论 #27207069 未加载
rikkipitt将近 4 年前
I&#x27;m a Rails developer and have often wanted to try out Elixir but haven&#x27;t found a compelling reason (or perhaps, project) to do so yet. Maybe I&#x27;ll take the plunge and write my next app in it... Maybe get stuck in and try it on your next project too? I&#x27;d be interested to hear what you think as we&#x27;re in similar positions I think.
评论 #27193381 未加载
madhadron将近 4 年前
If this is a personal project, go ahead and try it. See what you think.<p>If this is a project for a company, then look at the intersection of what they have in-house expertise in running and maintaining and what you know well, and use that. Probably going to be Ruby on Rails if that&#x27;s your usual thing.
matreyes将近 4 年前
I’ve been working with Elixir for a variety of use-cases for years and I just love it. The only problem we had is the obvious: You don’t have all the libraries you will find in JS or Python. But usually is easy to dig into the oss libraries and create a PR, and the community is amazing!
claudiojulio将近 4 年前
I don&#x27;t like the operators&#x27; logic in elixir. There should be one for assigning variables, one for pattern matching and there is no rebinding of variables.<p>Something like:<p><pre><code> &#x2F;&#x2F;for assignment x = 1 &#x2F;&#x2F;for pattern matching x == 1 </code></pre> <i>Automatically translated.</i>
评论 #27206434 未加载
hnedeotes将近 4 年前
The more I use and learn languages the more I prefer Elixir&#x27;s (to be honest, Erlang&#x27;s) programming model. I&#x27;m not a types person (yet) so that is not as important to me as the building blocks and how it allows you to organise programs.<p>I think the first question you should ask yourself is, do you expect the same level of &quot;pick a lib, drop a lib&quot; as you would in RoR, or Nodejs? I haven&#x27;t had any problem with libs, basically because I&#x27;m ok with writing http requests if I need to, or do an auth flow myself - it&#x27;s not like those things are complex - but the first times it might take you more time than just picking something off that works immediately. On the other hand, the core of what I usually need, is pretty sturdy and extendable - Phoenix&#x2F;Websockets&#x2F;Ecto(Postgresql, you might have a different exp with other dbs)&#x2F;Oban and the standard lib&#x2F;erlang for all sorts of things that in many languages require external libs (or aren&#x27;t really doable without taking a sabbatical).<p>Also I don&#x27;t know if I live in a parallel world, but in many other languages, even ones with pretty heavy investing, many libraries that aren&#x27;t just translating http responses into whatever language representation of that, are subpar, or not extendable, or you need to almost learn a new language to use them, they&#x27;re solving things that shouldn&#x27;t be a library. There&#x27;s plenty of good libraries out there, including in nodejs, but comparing for instance its ecosystem is kinda pointless, when perhaps 90% of the libs in there don&#x27;t really warrant existing, or are to cover basic shortcomings or don&#x27;t solve really anything, or are specific to being run in a browser.<p>The second is, are you curious enough about the underlying mechanics and learning the programming model? This is sort of essential, because in most languages&#x2F;VMs everything is sort of a single program, where all things sprawl from a form of &quot;main()&quot;, and in Erlang you organise (or should) your application as many different &quot;main()&quot;s, it&#x27;s almost like an OS. It&#x27;s still obviously started from a single point, but once started it&#x27;s like having multiple applications running in a concerted fashion. There&#x27;s a curve to learning how to leverage that - and to be honest, not all problems require that - although again, the more I see other languages and use them the more I miss the structured form of programs it allows.<p>The third is, it&#x27;s a functional language - if you&#x27;re not used to it in any way some ways of solving problems might not be apparent immediately - they&#x27;re not more difficult or complex, they&#x27;re just different - for me solving problems with OOP is also not straightforward - it doesn&#x27;t mean it&#x27;s worse, I just don&#x27;t practice it as much as I do functional programming. There&#x27;s also obviously problems that are much better expressible with mutable data, but you have enough scape hatches for those cases that really need it - on the upside there&#x27;s also plenty of problems that are better expressed in functional languages.<p>Lastly, some useful patterns and ways of doing things require some &quot;acclimatisation&quot;, like using pattern matching to describe functions, conditions, and execution paths, ditching almost completely (almost) exceptions and throws in favour of tagged returns, building reliable sync&#x2F;async flows etc. The testing history in my view is excellent, as are the tools it includes, mix, iex, releases, and overall I would say it made me a much better programmer. I also would take some people&#x27;s shitting directly on the language or libs complaints with a grain of salt - I&#x27;ve seen a fair bit of idiotic uses of stuff in it (like holding a hammer by the head), and in those cases ask yourself if the libraries and programs other&#x27;s use or suggest instead are good software and evaluate them in the same context - complete external tools run by companies vs basic stdlib functionality.
ollran将近 4 年前
It is hard to find learning resources when trying to write NIFs for BEAM. The documentation and bindings are fine if you are using C, but when using some rarer programming language it can be quite difficult to get along.
amattn将近 4 年前
I think it&#x27;s the greatest thing ever. I wrote like 300 words over two blog posts here: <a href="https:&#x2F;&#x2F;amattn.com&#x2F;p&#x2F;the_sublime_developer_efficiency_of_elixir_phoenix_and_liveview_part_1.html" rel="nofollow">https:&#x2F;&#x2F;amattn.com&#x2F;p&#x2F;the_sublime_developer_efficiency_of_eli...</a><p>tldr:<p>- It’s quirky - There’s a learning curve - Taking the time to climb that curve can result in elegant solutions - The endgame is high developer efficiency<p>Not only that, but I find it fun and enjoyable. The ecosystem isn&#x27;t the largest, but the other positives more than make up for the deficits for me.<p>I only started learning elixir around November or so last year and I&#x27;ve launched two SaaS products in the past 6 months.
rusticpenn将近 4 年前
I use Erlang, Is Elixir a better alternative now?
评论 #27193365 未加载
CJPoll将近 4 年前
I&#x27;ve been a senior or staff engineer at several companies companies that have their backend tech stacks either primarily or entirely in Elixir. Two of those companies are now unicorns, Divvy (my current company) and Podium. I&#x27;ve seen elixir work great for small teams (~10-15 engineers total) and scale for that company as it went to 100-200 engineers.<p>Engineers at both unicorn companies consider Elixir one of the reasons they were able to grow the way they did, both in terms of customer count and engineers. Sure, it was hard to find people who had production experience with the language. Didn&#x27;t really matter; deploy it with Docker (and eventually Kubernetes) the way you would anything else, and if you need clustering then libcluster can manage most of that for you.<p>Learning OTP is a nice-to-have, but 98% of the time your devs don&#x27;t actually need in-depth understanding of it (assuming you&#x27;re a typical web-based startup). Web servers hitting a database is naturally pretty scalable as long as you design your database decently. Scaling your database is _way_ more important to scaling technical systems than your choice of programming language.<p>Even if your team doesn&#x27;t need a deep understanding of OTP, _you_ should have a good understanding of GenServer, GenStatem, Application, and Supervisor so you can evaluate 3rd party libs or develop in-house libs. Most devs who are working in product need to focus more on how to write well-factored code to interact with data services like Postgres, Redis, or Kafka.<p>Yeah, there&#x27;s a lot of hype around hot code loading, ETS, Mnesia, and the like. Don&#x27;t use them unless you absolutely have to. ETS is fine for a local cache once you have a generic garbage-collector as long as you don&#x27;t care about losing that cache on deploy. You probably care, so just use Redis most of the time.<p>The claim that it&#x27;s impossible to hire Elixir devs is way overblown. Just hire smart people; software engineering principles are applicable across languages even if the languages have different paradigms. You might have to find new ways of implementing those principles, but discussions around good boundaries and extensible code are more important than &quot;when should I use if vs case vs cond vs pattern-match in a function head?&quot;. Podium hired a _lot_ of engineers right out of dev bootcamps. They paid for that in code quality for sure, but even the most green engineers were able to get going in Elixir pretty quickly. As long as you have one or two &quot;seed&quot; engineers who are willing and able to teach others, the hiring problem isn&#x27;t really a problem.<p>I&#x27;ll get a lot of flack for this one, but if your company has a monolithic codebase, Umbrella Applications are a great way to enforce internal boundaries if you&#x27;re on Elixir 1.11 and have warnings-as-errors set up. Keep splitting any sub-apps that start getting large and the warnings-as-errors will prevent circular dependency hell for you.<p>If you&#x27;re doing a service-oriented or microservices architecture, Elixir is pretty great. Synchronous communication is pretty easy to set up if you want synchronous communication; Absinthe makes a great API gateway, gRPC support is decent on both the client and server sides (though testing still needs to be improved with the gRPC lib...)<p>If you&#x27;re using plain ol&#x27; HTTP, there are a plethora of HTTP client libs that scale well (and a number that don&#x27;t without effort - some painful lessons at Divvy on that one). Phoenix is a great HTTP server framework, and LiveView is great if you don&#x27;t want your team to have specialized frontend vs backend devs or get an MVP off the ground.<p>Kafka support is... fine, I guess. As long as you only need basic Consumer&#x2F;Publisher capabilities, anyways. If you need anything more advanced, you have to go somewhere else to get the stateful processing capabilities that Flink or Kafka Streams or KSQL will give you.<p>Redis support is good, with varying options for high-level vs low-level implementations.<p>The hardest part of working in the ecosystem is the ecosystem itself. The built-in tooling is amazing, but Ruby&#x2F;Java&#x2F;JS&#x2F;&lt;insert other top 10 tiobe language here&gt; will always have a larger selection of libraries.
评论 #27203809 未加载
hit8run将近 4 年前
Happy to have stayed away from it ever since.
BMorearty将近 4 年前
This question reminds me of a story about Yahoo! Stores, which came out of Yahoo!’s acquisition of Viaweb, cofounded by PG. As he has frequently mentioned, Viaweb was written in Lisp and he felt they got an inherent advantage by using Lisp [0].<p>Several years after Yahoo! acquired Viaweb I was having lunch with the then-VP in charge of Stores and other business products, who was not from the original Viaweb team. The Yahoo! team was rewriting Stores in C++ (and Perl, apparently from a current Google search, although I only remember him mentioning C++). He kind of rolled his eyes when he said for some reason the original team wrote it in Lisp. He said it was hard to hire Lisp programmers to join the team.<p>PG was not well-known yet, so even if we could just search the web to find his reasoning for using Lisp (the article was written in 2001), we wouldn’t have thought of searching. But even if we had found it, I don’t think it would have mattered. There’s a different set of advantages and tradeoffs for a small team building a new product, when they are focused on fast development and growth and they come from a similar background, vs. a team in a larger company that has people coming and going and wants the ability to hire from the general developer pool without having to train everyone on a less-common language.<p>Disclaimers: this is a generalization, of course. You might be able to point to counterexamples. Some larger companies are more willing to hire language specialists and experts.<p>I’m just relaying what I was told. Please don’t angrily debate me on the benefits of languages like Elixir and Lisp. Your anger would be misplaced. Personally I absolutely love those kinds of languages and would much, much rather use them than something like Java [1]. That’s why I stayed a hacker my whole career and never became a manager.<p>[0] <a href="http:&#x2F;&#x2F;www.paulgraham.com&#x2F;avg.html" rel="nofollow">http:&#x2F;&#x2F;www.paulgraham.com&#x2F;avg.html</a><p>[1] <a href="http:&#x2F;&#x2F;www.paulgraham.com&#x2F;javacover.html" rel="nofollow">http:&#x2F;&#x2F;www.paulgraham.com&#x2F;javacover.html</a>
评论 #27196087 未加载
whereis将近 4 年前
Any comments on BEAM as it pertains to security? Is it ripe for being picked apart for vulnerabilities? Could these be exploited remotely via Elixir&#x2F;Erlang web applications?
joelbluminator将近 4 年前
My advice, not that anyone is asking, is only do Elixir if you love it. If you are doing it expecting it to become the next Node thats definitely not happening.