4 ms·
Interestingly enough I started using Erlang around the same time and while I've continued to use it for the project I started then on and off, I've not had a lo
by bfrog 7y ago
Interestingly enough I started using Erlang around the same time and while I've continued to use it for the project I started then on and off, I've not had a lot of reason to use it on other projects. I don't ever think it'll be as wide spread or as popular for many of the reasons listed. I do think it will continue to be a tool used to create great projects with very few hands. In the right hands and for the right projects it is an incredibly productive tool.
- melling 7y agoIf you search HN history, it appears Elixir seems to get much more buzz. Saw this from a few days ago: https://news.ycombinator.com/item?id=20357055 https://news.ycombinator.com/item?id=20357055 Elixir is just a slightly changed Erlang syntax?
- sergiotapia 7y agoElixir is a language that compiles down to bytecode that runs on the BEAM VM.
- brightball 7y agoCleaner syntax, macros and a whole lot of developer productivity focused tooling.
- macintux 7y agoDisagree with “cleaner”.
- y4mi 7y agoDisagree with "disagree" ...see where that leads us? Please actually voice reasons how it's not cleaner, as it's most definitely less verbose, And having less clutter is generally seen as cleaner
- macintux 7y agoIt’s more verbose when defining functions, calling anonymous functions, and referencing atoms. Calling functions with and without parens makes for a less clean syntax. Less consistency (plus mandates the dot notation for calling anonymous functions).
- y4mi 7y ago> It’s more verbose when defining functions, calling anonymous functions, and referencing atoms. and we're finally finding out how both opinions are correct when people say that elixir code is cleaner, they're normally talking about the significantly reduced amount of code they have to write because of the macros. its not specifically about how they're defining a function or calling them anonymously while i cant say that i agree with atom reference, (its 1 char in elixir, two in erlang), you're definitely correct about that annoying idea they've had about dropping parenthesis on functions without parameters... that was just misguided i think.
- macintux 7y agoUsing an atom doesn’t require any extra characters in Erlang. Update: just realized you mean the single quotes when you need an arbitrary atom name. Understood. I definitely wish Erlang had the same macro capability. I just find the overall syntax sufficiently unpleasant that I can’t get into Elixir.
- klibertp 7y ago> I just find the overall syntax sufficiently unpleasant that I can’t get into Elixir. Please, don't use such an excuse for not trying out a language. :( The unpleasantness you speak about is akin to motion/sea sickness - the signals your brain receives disagree with the brain's predictions of what they should be. The discrepancy manifests as a feeling of unease at the very least, or you may throw up non-stop for 3 days on the deep end, but, eventually, the sea sickness disappears completely. I believe I experienced something very similar to this many times while learning many strange, exotic languages as a hobby. When the syntax or semantics were completely outside of what I already learned, I was irritated that "I don't even know how to ...something...". When the new language was close to what I already learned, I was irritated that "it doesn't work as it should" due to the differences. Basically, I experienced some kind of rejection reaction from my brain every time. But then, after a few days to a few weeks, that feeling faded and disappeared. There's a technique I thought up and used a few times which helped me with especially hard, complex, or simply exotic syntaxes. I'm not sure if it will work for everyone, but it helped me with Lisp and Prolog when I first learned them. What I did was to print several tens of pages of (syntax-highlighted and preferably heavily commented) example code and scatter them around the house at spots I was likely to look at. Next to the mirror in the bathroom, on the fridge doors, on my desk, and so on. I wasn't trying to actively read that code very much, just glanced at it from time to time, and sometimes tried to read a bit more when I was bored. When I returned to actually learning the language the next weekend (I think), it went much easier than before. I still wasn't able to write in the language, obviously, but reading - even if I didn't really understand more of it than before - stopped being a hassle, the feelings of rejection disappeared, and I was able to learn quickly from that point on. Well, that's just my theory based on personal experience, so it may be utterly stupid or just my imagination, so take it with a grain of salt. Still, I believe the feeling of unpleasantness from the syntax should be very easy to neutralize and as such it's not, IMHO, a good reason for "not getting into" a language which is otherwise interesting (whether Elixir is such for you is another matter).
- jjnoakes 7y agoIt'd be nice if dissenting opinions came with elaboration to continue the discussion instead of shut it down.
- njharman 7y agoThe dissenting opinion that it has "cleaner" syntax came with no elaboration.
- mrdoops 7y agoSyntax is a subjective concern for sure. My experience has been that Erlang takes a little more effort and time to read fluidly, but only when first learning. I think this is because Erlang uses visually subtle tokens for important language distinctions (upper vs lower caps and periods being the primary culprits). Now that I've spent enough time in the ecosystem reading Erlang isn't really a problem, but Elixir's syntax felt like it took less mental effort to read when starting out. I think Elixir making different token choices for these distinct ideas is the main reason for readability improvements. Especially since Erlang has less different tokens overall which you'd think would help reduce the noise.
- yawaramin 7y agoElixir has a homoiconic syntax and hygienic macros, like a Lisp. In fact much of the user-facing syntax of Elixir is just macro definitions. You can do a lot of things with it at compile time, and people take advantage of it to do really cool things like compile Phoenix routes down into a single static dispatching function so that requests can be routed quickly.
- grzm 7y agoCould you expand on what you mean by Elixir being homoiconic? That doesn’t seem readily apparent to me, and is contradicted by posts such as http://www.petecorey.com/blog/2017/08/07/what-if-elixir-were-homoiconic/ http://www.petecorey.com/blog/2017/08/07/what-if-elixir-were...
- yawaramin 7y agoYup you're right, my bad–I mixed up homoiconicity and hygienic macros–apparently like many before me!