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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Elixir 1.2.0 Released

270 点作者 sadiqmmm超过 9 年前

11 条评论

dv_says超过 9 年前
Using Elixir here for a couple of months, for an app backend, and even for shell script type of projects. Great language, no surprises, and very responsive community -- really, my biggest wish is for more people to try it, as I think it&#x27;s still relatively niche. Had no previous Erlang experience. While you don&#x27;t have to write Erlang code itself, you&#x27;ll over time become familiar with Erlang&#x2F;OTP architecture concepts, such as GenServer, ETS, distributed nodes, and so on.<p>Was very happy to see this recent post from Pinterest [1] as a sign that some of the more &quot;mainstream&quot; teams are starting to look at it.<p>Also, a repost [2] of some helpful tips if you&#x27;re just getting started.<p>[1] <a href="https:&#x2F;&#x2F;engineering.pinterest.com&#x2F;blog&#x2F;introducing-new-open-source-tools-elixir-community" rel="nofollow">https:&#x2F;&#x2F;engineering.pinterest.com&#x2F;blog&#x2F;introducing-new-open-...</a><p>[2] <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=10278870" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=10278870</a>
quaunaut超过 9 年前
How ironic, I was wondering just last night when 1.2 would be released.<p>I&#x27;m a newcomer to Elixir, and have really been enjoying it. As a Python-&gt;Rubyist, it&#x27;s been really interesting to finally hit a functional language, and some of Elixir&#x27;s most basic features just seem crazy in comparison to what I&#x27;ve come from. Some neat examples:<p>* Pattern Matching. In other words- you don&#x27;t assign things to variables, you match things. Elixir&#x2F;Erlang is just doing algebra behind the scenes. I&#x27;m sure this is a gross simplification, but it&#x27;s enabled me to write some really condensed code that still makes a bunch of sense.<p>* Streams. I know Node developers would laugh at this being a new concept, but I hit Streams when I was doing Node, and I didn&#x27;t get it. Streams in Elixir feel much more self-evident, and feel much easier to read.<p>* The Pipe Operator( |&gt; ). This effectively lets you simplify code by just passing results from one thing to the next. For example(taken from the excellent &quot;Programming Elixir&quot; by Dave Thomas):<p>$ (1..10) |&gt; Enum.map(&amp;(&amp;1*&amp;1)) |&gt; Enum.filter(&amp;(&amp;1 &lt; 40))<p>=&gt; [1, 4, 9, 16, 25, 36]<p>So there, it takes the 1..10 range, maps the squares of each element to an array, then filters the array to just the elements that are less than 40.<p>It&#x27;s a surprisingly enjoyable language to program in, and best of all coming from a Rubyist- the performance gains are automatic, especially once you grok some of Elixir&#x27;s crazier(but easy to understand) powers.<p>-----<p>The other thing I really like about it, is how friendly the community seems. I feel personally predisposed toward extremely friendly communities- Ember.js was the first community that made me feel like I had a home- and the care with which Jose Valim and the core team treat people, and the general &quot;Give back everything you can&quot; attitude of the community is really just inspiring.<p>My newest side project was something I dropped because I thought that the hardware necessary would make it not worth the effort of building it, but now I have complete confidence in it.<p>I encourage you to take a shot at it if you&#x27;re looking for a fast, functional language with a clear syntax and easymode concurrency.
评论 #10821884 未加载
评论 #10822774 未加载
评论 #10822090 未加载
评论 #10822092 未加载
评论 #10821860 未加载
lectrick超过 9 年前
Just want to chime in reiterating everyone&#x27;s thoughts already here that this language is fun, interesting, and worth your time investment to investigate.<p>The biggest hurdles I had coming from OO Ruby were 1) how to handle state, since you no longer can just hang information off any arbitrary object attributes, 2) pattern matching (but now that I grok it, I love it, it&#x27;s so useful and leads to more concise code), 3) lack of inheritance (although oddly, I don&#x27;t seem to miss it, it just leads to a somewhat different code design), 4) OTP semantics (which after you mount the learning curve, make a lot of sense from a resiliency standpoint).<p>There are a number of neat little details not yet mentioned or emphasized here such as full Unicode support, full-fledged macros that give you full AST access (in a non-homoiconic language, that is a rarity!), custom sigils (<a href="http:&#x2F;&#x2F;elixir-lang.org&#x2F;getting-started&#x2F;sigils.html" rel="nofollow">http:&#x2F;&#x2F;elixir-lang.org&#x2F;getting-started&#x2F;sigils.html</a>), the ability to easily call into any Erlang library, the fantastic :observer.start() utility for visually observing tons of details about a running pid hierarchy, etc.<p>One possible hurdle unique to languages that feature message passing between independent processes (pids or process id&#x27;s) as a core feature is that once you have a pid hierarchy, it seems to me that inevitably, one of them will get a backlog of messages requiring you to either apply back-pressure techniques (slowing down upstream synchronous messaging by slowing down replies, basically) or pursue some other strategy (code refactoring etc.) when messages start to get discarded under load due to overflowing the pid inbox.
评论 #10822949 未加载
szx超过 9 年前
I&#x27;d be curious to hear some criticism, negative experiences, downsides from people with deeper experience. This thread is 100% positivity and praise, which is highly unusual for HN (New Year&#x27;s afterglow??)<p>To be clear, my occasional dabbling in Elixir has yet to reveal any major shortcomings so this isn&#x27;t an elephant in the room kind of situation, just a genuine request from people whose thoughtful opinions I generally appreciate.
评论 #10823166 未加载
评论 #10823204 未加载
评论 #10824341 未加载
评论 #10823514 未加载
评论 #10823511 未加载
troyk超过 9 年前
Wow, already home brewed too! (OSX users can upgrade with `brew update &amp;&amp; brew upgrade elixir` and it just magically works -- because awesome people have made it so)<p>What a great way to ring the new year! Happy New Year everyone!
评论 #10823768 未加载
desireco42超过 9 年前
This is the best New Years gift I could hope for! :) I&#x27;ve been using and slowly switching towards Elixir for last few months. It is fun, refreshing, enjoyable to work with and community is very welcoming and pleasure to be part of.
评论 #10822241 未加载
bratsche超过 9 年前
There are two <i>really</i> great additions to Elixir 1.2: multi-alias, and matching variables in map keys.<p>Previously I found myself wanting to alias a lot of things, like:<p><pre><code> alias Foo.User alias Foo.Email alias Foo.Location </code></pre> Now with multi-aliasing I can do it all in one line:<p><pre><code> alias Foo.{User, Email, Location} </code></pre> That&#x27;s just a cool syntactic sugar kind of thing that maybe saves a few lines at the top of the file. But the map key matching is great, and something that I&#x27;ve frequently missed up until now.
imranismail超过 9 年前
&gt; Support for variables in map keys<p>Been waiting for this. To those that have not tried Elixir. I urge you to try it, it&#x27;s a fun experience
chippy超过 9 年前
In today&#x27;s Who&#x27;s Hiring thread, there is only one mention of &quot;elixir&quot;. I quite like that as Elixir still has the aura of something new for its own sake with the type of people that this attracts.
评论 #10823363 未加载
frik超过 9 年前
Can someone recommend me a community&#x2F;forum that centers around Elixir? (for Elixir&#x2F;Erlang beginner)
评论 #10821958 未加载
评论 #10822060 未加载
jbeja超过 9 年前
Since elixir is base on Erlang, it would have the same Repl workflow that you would find in Clojure?
评论 #10822012 未加载
评论 #10821947 未加载
评论 #10821946 未加载