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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Towards a better Erlang - The Excitement of Elixir

147 点作者 devinus超过 12 年前

9 条评论

josh2600超过 12 年前
Does anyone have a counterpoint to this article about why not to use Elixir?<p>We're pretty deep into using native erlang for our work so I don't know how much benefit we'd squeeze out of a switch to Elixir, but this is quite intriguing.<p>BTW, thanks so much for the mention. The core of Kazoo is an all Erlang Stack and we're proud of it (before anyone jumps at me FreeSWITCH is not written in Erlang but it's also not something we at 2600hz wrote). Building the sorts of massively scalable infrastructures we want with the uptime requirements we need would be much harder without the awesome concurrency tools Erlang provides.<p>Delighted that people care about these kinds of languages :D.<p>Disclaimer: I am the Community manager for <a href="http://www.2600hz.com" rel="nofollow">http://www.2600hz.com</a> and the Kazoo Product.
评论 #5100465 未加载
saraid216超过 12 年前
So... what's the catch? Can someone provide a devil's advocate against picking up Elixir?<p>I've been working at learning Erlang, but it's been a challenge and Ruby's syntax was a first love, so Elixir sounds ideal for me and I'm tempted to try it. It just... can't be as good as the hype. So I'd like some earnest objections to Elixir, especially if they're answered objections.
评论 #5100319 未加载
评论 #5100147 未加载
rdtsc超过 12 年前
This doesn't have to be an "either or" choice. The great thing is both of them live on the wonderful BEAM VM. They both can take advantage of a completely concurrent garbage collector and all the other goodies. Some modules can be written in Erlang some in Elixir.<p>Elixir it seems very easily can call Erlang functions. I don't know about vice-versa though.<p>A lot of things in the article are related to syntax. I agree that single assignment is not needed for concurrency and the if statement can just return a nil. This, I argue is a matter of preference. In a large system knowing that a variable you set could not have changed, makes state management more explicit, some might see that as a benefit.<p>Also if statements are actually expressions, they should return a value. Choosing a default value of nil seems arbitrary. Just add another clause to if. Besides you'd probably want to use 'case ... of' anyway in most place. Just because 'if' in Erlang matches with the same keyword from C, doesn't mean that both work exactly the same way.<p>Now with the records, yes, there has been talk about adding "frames" (the equivalent of dictionaries or hash tables in other languages). The developers are thinking about it and I believe in release after the next or the one after that we might see that.<p>Now one thing I am really excited about in Elixir is macros. The ability to create a DSL. That is what probably will get to start playing with it.
评论 #5100688 未加载
评论 #5100712 未加载
imsofuture超过 12 年前
I can't possibly be alone in <i>liking</i> the Erlang syntax...
评论 #5100329 未加载
评论 #5100356 未加载
评论 #5100403 未加载
评论 #5102254 未加载
jallmann超过 12 年前
Elixir looks interesting, but the issues it addresses in Erlang are mostly superficial and subject to taste; eg I like single-assignment, and consider 'nil' a deficiency that can usually be avoided with proper typing. But each to his own -- Erlang does have its quirks, but for me, that mostly fades once you're neck-deep in code.<p>I'd like to see a BEAM-based language designed with an eye towards advancing the tenet of fault-tolerance in ways Erlang currently can't. Probably the most significant weakness right now is with the type system -- lacking exhaustive checks for pattern and function matching always makes me nervous, since that's probably the most common source of errors in my Erlang code.<p>Rust looks promising in this regard. If a best-practices framework emerges a'la OTP, Rust is going to be the dream love-child of ML, C and Erlang.
评论 #5100748 未加载
kriro超过 12 年前
Yeah I'm monitoring them. Seems like a good bet that Elixir will be my language of choice down the road. Some great people behind it, I have a feeling once Dynamo gets a bit more mature (2013 is their year) the language will take off.<p>This video is a nice intro imo (~50 minutes): <a href="http://vimeo.com/53221562" rel="nofollow">http://vimeo.com/53221562</a>
评论 #5100279 未加载
ryeguy超过 12 年前
I can't quite grasp how elixir works with immutability. I have used erlang and am familiar with how it works. In elixir, is it saying that if I create a record and store it in variable "a", I can later set "a=3", but I am unable to change the record once it's created?
评论 #5100655 未加载
minikomi超过 12 年前
Is elixir strong enough to learn on its own, or should it be thought of in a Coffeeacript frame of mind - where learning the underlying Erlang is pretty much required..
评论 #5102861 未加载
lucian1900超过 12 年前
Small nitpick: Clojure's macros are not hygienic. For better or for worse, this was a conscious decision.<p>If anything, Elixir's macros look more like Scheme's syntax-case, Rust's macros or sweet.js.