Is Elixir much better than Golang?

agolangf · · 1726 次点击    
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
<p>I was finding many resources and almost said to Elixir is better than Golang. At quora question:</p> <p><a href="https://www.quora.com/Concurrency-computer-science/Should-I-use-Go-Erlang-or-Elixir-for-a-mobile-app-backend" rel="nofollow">https://www.quora.com/Concurrency-computer-science/Should-I-use-Go-Erlang-or-Elixir-for-a-mobile-app-backend</a></p> <p><a href="https://www.quora.com/As-a-Web-developer-coming-from-Python-Django-background-should-learn-Golang-or-Elixir-Phoenix-Why" rel="nofollow">https://www.quora.com/As-a-Web-developer-coming-from-Python-Django-background-should-learn-Golang-or-Elixir-Phoenix-Why</a></p> <p>Five days ago, I was read a post in Medium.</p> <p><a href="https://medium.com/@theflapjack103/the-way-of-the-gopher-6693db15ae1f#.6nsi75gfk" rel="nofollow">https://medium.com/@theflapjack103/the-way-of-the-gopher-6693db15ae1f#.6nsi75gfk</a></p> <p>Or a post:</p> <p><a href="https://medium.com/@tjholowaychuk/farewell-node-js-4ba9e7f3e52b#.ts7nlryjh" rel="nofollow">https://medium.com/@tjholowaychuk/farewell-node-js-4ba9e7f3e52b#.ts7nlryjh</a></p> <p>I don&#39;t know why many users choose Go lang instead of Elixir.</p> <p>And in GitHub trending, I recently see a repository have many starts, but almost is the system, not a web application.</p> <hr/>**评论:**<br/><br/>throwbible: <pre><blockquote> <p>I don&#39;t know why many users choose Go lang instead of Elixir.</p> </blockquote> <p>The standard library for Go seems more complete which might help people get started quicker. Go is backed by Google, which may tip the scale for some. Go also get more press. Where I see Elixir most is in Go discussions where some one will inject &#34;Have you tried Elixir&#34;. Given that Go is currently more popular than Elixir (I think) is could also push developers to pick Go, because the eco-system is larger and getting help will be easier. </p> <p>Honestly I don&#39;t think one language is &#34;better&#34; than the other, they&#39;re just different. Certainly there is areas where you might want to pick Go over Elixir and vice versa, but in the grand scheme of things, it more important to pick the language you&#39;re comfortable with. </p></pre>gdm85: <pre><p>I am using a 1/4 inches wrench for some bike repair job. Shall I use a 17/64 one instead? Which one is more trending?</p></pre>commentzorro: <pre><p>The 17/64, not just because it&#39;s more trendy but because of the obvious. Clever you.</p></pre>aaaqqq: <pre><blockquote> <p>Is Elixir much better than Golang? </p> </blockquote> <p>at what?</p></pre>dgryski: <pre><p>At being first in alphabetical order? </p></pre>aaaqqq: <pre><p>then yes, it is</p></pre>extrasaltorg: <pre><p>Also, at having a searchable name on hackernews. </p> <p>Articles have titles that contain &#34;go&#34; instead of golang and it becomes incredibly hard for me search them.</p></pre>vivainio: <pre><p>No</p></pre>kaeshiwaza: <pre><p>It depends what means &#34;better&#34;. Better because it has more feature ? because it&#39;s simpler ? because it&#39;s faster ? Best is to try.</p></pre>commentzorro: <pre><p>Pure opinion because ... kinda a loaded question ... anyway:</p> <p>If your application is on the scale of thousands of users with hundreds of concurrent users or less then both languages will likely handle things without breaking a sweat. Choose based on other factors: how and where you&#39;re going to deploy, costs, required third party integration, even just coding fun or learning if that fits.</p> <p>Otherwise here are a few points you might consider. If your application is heavily numeric and/or CPU bound then you&#39;ve hit a slight potential weak point in Elixir (BEAM really): +1 to the Go column. If your application needs a high degree of fault tolerance then that&#39;s a +1 for Elixir (again BEAM) as it&#39;s built in and battle tested. If you&#39;re going to need to scale horizontally then I&#39;d +1 Elixir. (Though Go is no slouch here, you do have to plan for this up front.) If you&#39;re looking for fast easy deployment and configuration then +2 for the Go column. </p> <p>None of this speaks to the languages themselves, they&#39;re different paradigms and that choice is completely subjective. (Though I do think Elixir code reads the most beautiful of the latest crop of languages.)</p></pre>DualRearWheels: <pre><p>&#34;Elixir is a functional, concurrent, general-purpose programming language that runs on the Erlang virtual machine (BEAM)&#34;</p> <p>You are comparing apples and oranges. One is functional language that runs in VM while other is procedural compiled to native code, those are complete opposite design (and performance) philosophies. In my opinion, VM languages will always be more resource intensive and slower, and functional languages are academia fad and not pragmatic (and again, slower than procedural), so no, elixir is not better than golang.</p></pre>1nonlycrazi: <pre><p>Functional languages are far more than a &#34;academia fad&#34;...have you been under a rock for a few years? </p></pre>quiI: <pre><blockquote> <p>functional languages are academia fad and not pragmatic</p> </blockquote> <p>Yeah, no one has ever written anything in Scala have they.</p></pre>: <pre><p>[deleted]</p></pre>DualRearWheels: <pre><p>Every language has something that other one don&#39;t. You look the whole package relative to what are your needs. OP didn&#39;t say anything about use case so I can only compare design philosophies which dictate performance, libs, tools and other things people already commented on here.</p></pre>blackjackjester: <pre><p>Is a big truck better than a hybrid? It kind of depends on what you are trying to do.</p> <p>If your goal is high performance functions, single server applications, and an easy learning curve, Go is for you.</p> <p>Elixir shines when you&#39;re building many interconnected systems, since the Erlang VM and OTP are build for fault tolerant message passing. It&#39;s also very good for embarrassingly parallel tasks due to the nature of Erlang processes.</p> <p>If you want to use something that is actually being used in the real world right now, Go is far more mature. Most of Dropbox, and most of Docker is written in Go.</p> <p>The only example of Elixir in production that I can think of right now is at Pinterest, where they replaced their API frontend with Elixir to more efficiently handle requests.</p></pre>kavehmz: <pre><p>I read the links you provided and I didn&#39;t see anything that says Elixir is better! They seem to be well balanced articles.</p> <p>Anyway, Elixir and Golang philosophy, approach and culture around them are different. Just pick the one that fits your project needs.</p> <p>edit: grammar.</p></pre>kjk: <pre><p>Here&#39;s a (very incomplete) list of (very well known) companies that use Go: <a href="https://quicknotes.io/n/1XB0-companies-using-go" rel="nofollow">https://quicknotes.io/n/1XB0-companies-using-go</a></p> <p>I don&#39;t think there is such a list for Elixir.</p> <p>So &#34;many users choose Go lang instead of Elixir&#34; is just false.</p> <p>Internet is large, you&#39;ll find people enthusiastic about just about anything, be it Forth or Elixir.</p> <p>When you pay attention to trends like the above &#34;how many companies use Go vs. Elixir in production&#34;, how many people install Go vs. Elixir plugin for Atom or Visual Studio Code, it&#39;s obvious that Go wins 100x.</p></pre>

入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889

1726 次点击  
加入收藏 微博
暂无回复
添加一条新回复 (您需要 登录 后才能回复 没有账号 ?)
  • 请尽量让自己的回复能够对别人有帮助
  • 支持 Markdown 格式, **粗体**、~~删除线~~、`单行代码`
  • 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
  • 图片支持拖拽、截图粘贴等方式上传