Name: Anonymous 2017-02-02 10:34
@davetchepak "What can C# do that F# cannot?"
NullReferenceException :-)
Educating the imperative gorillas about sum types:
https://chadaustin.me/2015/07/sum-types/
@davetchepak "What can C# do that F# cannot?"
NullReferenceException :-)
Unfortunately, C compilers do not verify that the null case is always handled, and this is a particularly prevalent source of errors in C code, since there is a tendency to ignore exceptional cases.Hahaha C is shit.
T + 1
types like Option
or Maybe
, so they bring no performance overhead.This usage of Option to create safe nullable pointers is so common that Rust does special optimizations to make the representation of Option<Box<T>> a single pointer. Optional pointers in Rust are stored as efficiently as any other pointer type.