4 ms·
It’s nice, but not that nice. The type system is primitive compared to modern alternatives and the use of functors for generics is clumsy. Also multicore still
by smabie 7y ago
It’s nice, but not that nice. The type system is primitive compared to modern alternatives and the use of functors for generics is clumsy. Also multicore still isn’t a thing, despite it being just around the corner for years. If the type system was as powerful as, say, Scala and multicore worked OCaml would be my go-to language. But at this point, I think F# would be a better choice for new projects. And you also get to use Akka.net with it, which could be a major value add.
- momentoftop 7y agoIf by "generics", you are referring to the sort of parametric polymorphism that you have in .NET and Java, then no, you don't use functors for that. # let foo x = x;; val foo : 'a -> 'a You need to use functors if you want higher-kinding, but they're generally useful beyond that, and I wish more typed languages had an SML style module system. F# doesn't have one, and has always had a punier type system.
- brmgb 7y agoNo offense but it's hard to take you seriously when you call OCaml type system primitive. Also OCaml obviously has generics independently of functors. Polymorphic functions and types are literally everywhere.
- tybit 7y agoI see functional languages with primitive type systems a pro not a con. We need simple languages like ReasonML more than something like Scala or Haskell if they are to be embraced more widely.
- k__ 7y agoLuckily, the only big competitor Reason has to mess with at the moment is TypeScript.
- dean177 7y agoWhat do you mean the type system is primitive? Compared to what?