News for hackers. Stuff that matters.
Re:OCaml for the Masses (2011) by proaralyst on Monday November 26, 2018 @06:53AM (#18532651)
Elixir is not statically typed. Thus you lose a lot of what makes OCaml great; a whole class of errors caught by the compiler before you run your program.

I'd say the type system isn't that much of a barrier to entry. You're likely used to one from any existing statically typed language; the only new things are sum types, polymorphic types & type inference. These aren't _that_ hard to get your head round but really improve the safety of your program.

Re:OCaml for the Masses (2011) by rkangel on Monday November 26, 2018 @07:29AM (#18532821)
My point was about barrier to entry. My experience is admittedly with Haskell rather than OCaml, but while I did get my head round these things to some degree, I was still a long way from being productive. And this is despite having come from a background of C++.

The debate on static vs dynamic is a far from settled one, but I think you would be hard pressed make the case that Python has no place. In this case, I'm suggesting that Elixir is a great way of getting people into functional programming and learning the value, while being immensely useful in its own right.

Learning that value is a good first step. I now find it immensely depressing every time I go from my Phoenix web-app back to the Android app. Kotlin is better than Java, but it's still a mess of objects and interfaces, and having to construct 5 things when it could just be passing a map to a function. The result is that I will now more aggressively pursue FP options when I'm looking at technology decisions (e.g. bucklescript is on my 'to investigate' list).

Re:OCaml for the Masses (2011) by proaralyst on Monday November 26, 2018 @07:43AM (#18532905)
Haskell has a famously high barrier to entry that has little to do with its type system or functional nature. As a pure lazy language you have to learn a lot of concepts (What does pure mean? What does lazy mean? What is a monad?) before you can be productive. Extending this into intermediate usage is difficult too; how do I begin to combine these monads I now understand?

I see your argument. If your aim is to get into functional programming then Elixir/Erlang, even Lisp/Scheme is fine. I don't think it's the functional nature of OCaml and Haskell that make them powerful; I think those parts of the language are great, yes, but the type system (static, algebraic, inferred) is the real secret sauce.