There are many articles explaining the things I’m about to log about. This is just my personal take and understanding on the subject.
I think this is how Haskell Typeclasses are transposed in Ocaml.
The most common data types I can think of is the
Maybe data type from Haskell or the
option in Ocaml. These data types are how these languages the possibility of
null. These data types are going to prevent us from encoutering
NullReferenceException like in other languages.
Maybe and Option instance of the
The main difference here is I have to specify which
fmap I have to use because Ocaml’s typesystem is not as powerful as Haskell’s where it will immediately determine which
fmap to use just based on the type.
Bucklescript will represent
Some as an array.