5 ms·
I agree and the closest thing I've found to a Haskell lite is F#.
by elviejo 8y ago
I agree and the closest thing I've found to a Haskell lite is F#.
- debatem1 8y agoOcaml is, imo, a pretty and not utterly impractical language as well.
- weberc2 8y agoI knew the thread would head in this direction. :) Unfortunately, those languages' syntaxes are only marginally better and they have more complexity than I care for (especially objects and inheritance).
- gmfawcett 8y agoGiven your "especially" comment -- you might be mis-remembering something about OCaml? It's true that it has these features, but in practice they are almost never used. The object system is useful if your program's design really needs open recursion / inheritance. But it's far more common to build an OCaml program using other constructs (modules and simple data types). That's not to say that there isn't any complexity in OCaml. The type system and module/functor system have a daunting number of features. But most applications stick to a much simpler subset of the language, which is quite straightforward and easy to reason about.
- TylerE 8y agoDoes it still do the thing where it doesn't have operator overloading? Made math code oh so ugly.
- lenticular 8y agoOcaml has no ability to do ad-hoc polymorphism at all (but it does have parametric polymorphism), which affects more things than operators, so that's why not only have the weird math operators, but things like string_of_int. This will change at some point though. Modular implicits are coming to Ocaml. These are similar but much simpler than Scala's implicits, and allow the same kinds of patterns. If Ocaml gets that and eventually gains a bigger community with better library coverage, it's something I would consider using heavily.
- TylerE 8y agoThat would indeed be good yeah - it sounds like a small thing but it really would help code readability quite a bit, especially when dealing with stuff like bignums.
- ummonk 8y agoAlso has a syntax reskin in the form of ReasonML