News for hackers. Stuff that matters.
Re:Try OCaml by rezeroed on Friday September 07, 2018 @07:45AM (#17933501)
I don't see why these two are being lumped together. I see ReasonML needs OCaml, but not that OCaml needs ReasonML. OCaml I expect will become increasingly mainstream - I've started using it instead of rust on personal projects. ReasonML would increase exposure to OCaml, but OCaml in no way needs it to succeed.
Re:Try OCaml by hajile on Friday September 07, 2018 @01:52PM (#17936247)
ReasonML was written in SML then they switched to Ocaml because everyone at Facebook already knew it and caml4p is a thing.

Because it is "just Ocaml", all the weird parts of Ocaml bleed through the reason language design. No operator overloading, nominal record typing, 3 competing standard libraries (plus the all-too-small actual standard library). The list of oddities is rather long.

SML was and is a better choice. SML has structurally typed objects and first-class constructors. No named arguments, but structurally typed objects do a better job at this (like JS destructuring, but more efficient). Anonymous records are possible. A ref type rather than mutable record fields. Only one `let`. PolyML has shipped a multi-process implementation for years while Ocaml's is still in an unending beta. SuccessorML (SML 2.0) is adding some syntactic niceties along with things like module typeclasses (modules should prevent the typeclass hell of Haskell). Most importantly, SML is a standard with multiple implementations and isn't completely tied to the success of Jane Street.

Re:Try OCaml by pjmlp on Friday September 07, 2018 @02:41PM (#17936639)
OCaml has an big presence in European universities, specially in France thanks to INRIA.

Our university was big in Prolog (SWI) and Caml Light back in the day, and they still are, just with Caml Light having been replaced by OCaml.

The only reason I known a bit about SML is because I am a language geek, it is hardly known in this side of the pound.

Re:Try OCaml by ernst_klim on Sunday September 09, 2018 @07:16PM (#17948320)
OCaml's objects and modules are structurally typed.
Re:Try OCaml by gmfawcett on Friday September 07, 2018 @08:47AM (#17933813)
It doesn't seem odd to me to lump them together. Reason is just an alternate syntax for Ocaml, and because of this the "Reason toolchain" is usable with Ocaml code as well, and with mixed Reason/Ocaml projects.
Re:Try OCaml by dudul on Friday September 07, 2018 @08:04AM (#17933581)
Interesting, I really like OCaml myself but see it mostly as a fringe language as of today. What makes you think it will become more mainstream?
Re:Try OCaml by rezeroed on Friday September 07, 2018 @09:21AM (#17933988)
I think it hits a sweet spot. Not as boring as Go, not as obstinate and distracting as Rust ("I'm sorry, Dave"), not purely functional for those who don't want to go all the way in that direction. I expect people who try those languages and decide "not quite" might try OCaml and find it more flexible and elegant. It's appearing more often in the "who's hiring" posts. There are the characteristics such as compilation speed vs others which could do with being, ahem, compiled into a post somewhere, if not already.
Re:Try OCaml by joshmarlow on Saturday September 08, 2018 @07:14AM (#17940429)
> not purely functional for those who don't want to go all the way in that direction

That's why I first loved it. I liked what I knew of Haskell but was skeptical of the Monadic IO system (I've since warmed to the idea). OCaml was in a perfect sweet spot in my opinion.

Also it feels a bit less abstract in some difficult to define way - I don't think Monads really clicked for me until I was using Options in OCaml.

I'll also second the opinion that as a _language_ OCaml is more ergonomic than Rust. However, I find that Rust is more _community ergonomic_ - it's easier to find libraries and contribute to them. Related to that - the build process is just spot-on. With OCaml, I found myself tripping over obscure errors in my build process about every month or so.

For me, OCaml is a bit like the one that got away.

But I'm excited about the momentum behind the Reason project!