Thanks, this was super helpful. I'll have to spend the time going through functors this weekend to try to grok them.
But also F# doesn't allow null values, it uses the Option type as well.
F# most definitely allows null values. They might not be encouraged, you can't always assign a literal null to a type, but null is very much a first class concept in F#.
You're far less likely to run into them in F# code compared to C#, though.
- Functors (https://realworldocaml.org/v1/en/html/functors.html)
- OCaml-style objects (https://realworldocaml.org/v1/en/html/objects.html)
- Polymorphic variants (https://realworldocaml.org/v1/en/html/variants.html#polymorp...)
- The camlp4 preprocessor (https://realworldocaml.org/v1/en/html/the-compiler-frontend-...)
- Stronger guarantees from type system. F# allows null values, it seems, while you would need to use an Option type in OCaml.
[0] http://stackoverflow.com/questions/179492/f-changes-to-ocaml