4 ms·
Hi, Elixir creator here, thanks for commenting! You may want to watch my talk at Erlang Factory SF 2015: https://www.youtube.com/watch?v=Lqo9-pQuRKE https://www
by josevalim 11y ago
Hi, Elixir creator here, thanks for commenting! You may want to watch my talk at Erlang Factory SF 2015: https://www.youtube.com/watch?v=Lqo9-pQuRKE https://www.youtube.com/watch?v=Lqo9-pQuRKE
Elixir is not really about the syntax, we have great tooling, our own standard library (with proper Unicode support, collections, unified API for dictionaries, etc) and our own approach to some constructs in OTP.
Feel free to ping here if you have any questions. I will make sure to check this thread again later.
- benaiah 11y agoThe independent stdlib is interesting, and I haven’t seen Elixir advocates mention it much before. I’ll have to look into that.
- rubiquity 11y agoThe separate stdlib one of the easiest parts of Elixir to take for granted but is nonetheless a really nice part about the language. I find Elixir's stdlib to be small and yet it still covers a huge amount of your typical needs when writing Elixir.
- ghayes 11y agoOn tooling: `Mix` is a great build tool which directly integrates `Hex`, a package manager similar to ruby gems. Additionally, ExUnit is a great built-in unit test library. These tools alone would be a good reason for an erlanger to check out Elixir. I've been recommending Elixir as the language of choice to all my colleagues. I truly believe it will bring the advantages of OTP architecture to a wider audience of programmers.
- ffn 11y agoLove the language, I've been using it (phoenix) to build a more real-time version of my current rails app. But I have a concern with Elixir core's Enum. In particular, the Enumerable protocol has us implementing Enum.reduce for our own data-types, but Enum.map is written as `reduce(collection, [], R.map(fun)) |> :lists.reverse` is there any chance Elixir's enum core can take a page from Clojure's transducer idea and, instead of implementing map with reduce and [], implement it with transduce and some function that steps? I've often had the need to map and filter over strings to achieve rails-like features such as #to_url, #classify, #underscore, and #humanize... but being forced to either rewrite Enum functions for strings or constantly peppering in String.split("") and Enum.join("") feels really bad.
- josevalim 11y agoIt would be possible to have something like `Enum.map |> Enum.into`. You could also do `Stream.map |> Enum.into` if you don't want to traverse it multiple times (similar to Clojure's `into`). In fact: iex> Stream.unfold("hello", &String.next_codepoint/1) |> Enum.to_list ["h", "e", "l", "l", "o"] The reasons we don't have first class support for this though are: 1. There are multiple ways you could traverse a string. By bytes, by codepoints or by graphemes. I don't think we should pick any of those as default. Ruby did that and to this day it is source of confusion (aggravated by the behavior change from 1.8 to 1.9) 2. Modifying strings like this would be horribly inefficient. Using split/join wouldn't be recommended also as you are generating a bunch of intermediate garbage to go from string -> string. The recommended way is to rely on pattern matching and Elixir's bit syntax as the compiler will be able to optimize most cases well.
- yellowapple 11y ago> Elixir is not really about the syntax Don't lie, Jose; we all know it's about the syntax ;) Kudos for the awesome language you've created.