Pretty stoked for this. I started learning Elixir a few months ago [0] and it's been a great balance of fun + practical. Way easier to get up and running compared some other FP languages I've dabbled with in the past :P Also shameless plug: we're currently working on an open source messaging product called Papercups [1] if anyone is looking for an Elixir project to hack on! [0] https://www.papercups.io/blog/elixir-no…
I know you from your previous ShowHN, good luck, your product looks great!
Elixir 1.11
71–80 of 104 posts
Re: Elixir 1.11
#72Question from someone who's never tried Erlang/Elixir but is interested. If you're starting a greenfield project in 2020, is there any reason to use baseline Erlang instead of Elixir? I get the impression that Elixir is a strict improvement (besides legacy compatibility). But this is a very very uninformed impression.
Erlang's syntax is unusual, but after grasping the concepts I always found the language logical and easy to understand. On the other hand, I haven't been able to get comfortable with Elixir. It's a significantly larger language, which comes with higher complexity (but also lets you write code at a higher level of abstraction). I often found myself only half-understanding the code I was writing (and I always make an effort to fully understand what I'm doing).
And personally I find the Elixir syntax to be among the most confusing and inconsistent (especially when compared to Erlang).
Nevertheless, if I was making something web related, I would definitely go for Elixir (because of Phoenix). If I was making something lower-level, I would probably consider both options.
Re: Elixir 1.11
#73Question from someone who's never tried Erlang/Elixir but is interested. If you're starting a greenfield project in 2020, is there any reason to use baseline Erlang instead of Elixir? I get the impression that Elixir is a strict improvement (besides legacy compatibility). But this is a very very uninformed impression.
Otherwise, I would say stick with elixir. It is more opinionated about how to do tests, how to organize your code, how to do documentation, how to deploy, how to use libraries, all of which will make your life way easier, especially for a greenfield project.
Re: Elixir 1.11
#74Earlier quoted context omitted.
I work in Elixir most of the time but can read and write Erlang reasonably well, here's my two cents. Elixir's syntax was inspired by ruby and so if you've used ruby or look at ruby code and think, "yea, I get what's going on here" then you will likely find working with Elixir's syntax preferable to Erlang. Erlang's syntax was based off of Prolog and so it will be less familiar, unless you have done a bunch of Prolog…
Speaking for myseld, rebinding variables in Elixir is my least favorite part of the language, and I specifically avoid using the feature.
I 100% guarantee you don't miss "immutable variables" in your REPL.
Pid = module:start_link(...).
oh crap. start_link/n returns {:ok, _}, not naked pid. {ok, PidForRealThisTime} = Pid.Re: Elixir 1.11
#75Re: Elixir 1.11
#76Earlier quoted context omitted.
I'll echo this - when I've worked in polyglot shops, specifically on a team that did a lot of Erlang, we hired for "exposure to functional paradigms", not Erlang. The only places that looked to hire the specific language (and even that was negotiable) were places that just had Java. And the average quality of applicants was universally worse.
It's a common practice to at least say what stack you're working on on a job ad. If it's not a requirement I usually see "We use Rails but don't expect you to know it already".
Re: Elixir 1.11
#77Earlier quoted context omitted.
The conjunction here is purely to taste, since utilitarian implies functional, as well as not particularly attractive; both are correct (as would just 'utilitarian', since it's not a loss of information, implying as it does the functional aspect).
I read that comment less literally and more like “they just about work for their function, but damn they ugly” :-)
Re: Elixir 1.11
#78Earlier quoted context omitted.
I work in Elixir most of the time but can read and write Erlang reasonably well, here's my two cents. Elixir's syntax was inspired by ruby and so if you've used ruby or look at ruby code and think, "yea, I get what's going on here" then you will likely find working with Elixir's syntax preferable to Erlang. Erlang's syntax was based off of Prolog and so it will be less familiar, unless you have done a bunch of Prolog…
Speaking for myseld, rebinding variables in Elixir is my least favorite part of the language, and I specifically avoid using the feature.
def foo(bar) do
bar = decorate(bar)
{:ok, bar}
end
I like that better than calling it something like `new_bar`. I kind of wish there was prime syntax along the lines of `bar' = decorate(bar)` but I can deal with re-binding when only used like this (and really, the stakes are low). More complex cases can generally always be handled with piping.Re: Elixir 1.11
#79All I could only ask for today is just a better ide support. I don't like vscode; even though the plugin for intellij has improved, there is still a lot to be desired
Re: Elixir 1.11
#80Earlier quoted context omitted.
Speaking for myseld, rebinding variables in Elixir is my least favorite part of the language, and I specifically avoid using the feature.
I'm on the fence about re-binding variables. I don't really mind it and have gotten used to the pin operator when I need it. I actually use variable re-binding quite a bit but always only in situations where I want a prime. def foo(bar) do bar = decorate(bar) {:ok, bar} end I like that better than calling it something like `new_bar`. I kind of wish there was prime syntax along the lines of `bar' = decorate(bar)` but…
def foo(bar!) do
bar! = decorate(bar!)
bar! = some_more(bar!)
{:ok, bar!}
end