News for hackers. Stuff that matters.
Re:Why Crystal Is My Next Language by freedomben on Sunday June 10, 2018 @10:26PM (#17281297)
It's just me, but I view the lack of OO features in Elixir as a really good thing. You still have structs and some other OOish type stuff, but the emphasis on composition and modularity has really made Elixir programs a joy to read and understand.

The lack of a single binary isn't a fully fair criticism. While technically it is true, it doesn't describe the shipping experience. You will need Erlang installed on the target machine, but using escript you basically ship a "single binary/file" and it includes everything it needs to run. It's quite elegant, and erlang is super easy to install on basically all *nix systems.

Re:Why Crystal Is My Next Language by mnm1 on Sunday June 10, 2018 @11:21PM (#17281503)
It's definitely not just you. Elixir and other functional languages are preferred by many, including myself, for this exact reason. I simply do not see any pros to traditional OO languages and functional languages like clojure (maybe elixir too, I haven't had a chance to study it in depth) include polymorphism, one of the few good OO ideas. Maybe it's just me, but after two and a half decades of OO, I expect it to make sense and it still doesn't in any meaningful way. That's one of the many reasons functional languages are attractive.
Re:Why Crystal Is My Next Language by juhatl on Monday June 11, 2018 @02:59AM (#17282354)
I might've misunderstood what you referred to in this particular case, but you generally don't need to even have Erlang installed on the target machine to ship Elixir (and/or Erlang) applications. Tools like Distillery make it easy (a boolean config value) to include the ERTS with your deployment, leaving you with a single .tar.gz to move to your target environment. The only caveat here is that the build machine and target machine architectures must match.
Re:Why Crystal Is My Next Language by freedomben on Monday June 11, 2018 @03:02PM (#17287384)
Very interesting, thanks! I'll definitely be looking into Distillery a little closer.
Re:Why Crystal Is My Next Language by brightball on Sunday June 10, 2018 @10:36PM (#17281336)
Agree with this entirely. There are so many long term issues that you avoid by building things this way.

Plus the run time gives you benefits that you're not getting in any server side language that doesn't run on the BEAM. There's BEAM and everything else...and everything else is a really crowded field.

Re:Why Crystal Is My Next Language by kungfooguru on Monday June 11, 2018 @11:18AM (#17284963)
You should ship a single tarball (target system built from a release) that unpacks with everything you need, including the Erlang runtime, and run it. There is no need to install Erlang on the host and better to not use escripts unless it is a user facing cli tool.
Re:Why Crystal Is My Next Language by fgimian on Monday June 11, 2018 @03:23AM (#17282436)
Yep, many of my colleagues at work use Elixir in fact and they say the same. Ultimately, I started with C++ ... a long time ago (2001) ... and from day one I learned coding using an object-oriented approach.

A lot of this comes down to the fact that one has to really commit to a functional mindset and go all-in like my friends at work have. This wasn't a commitment that I was personally ready to make, especially since all the programming I do at work is in Python and OO-based, and I have limited time to code outside work :) I think that if I was coding a project full-time at work in a functional language, I'd be more inclined to use this paradigm in my own projects.

Without a doubt Elixir is a great GREAT choice and has such a mature ecosystem and tried and tested underpinning that I can understand why anyone would choose it for a project that will run in production. The guys at work have been very happy with it so far, and the language is beautiful and easy to read.