On 17/01/2014 12:23, Jonathan Kimmitt wrote: > In my humble opinion the main purpose of Some _ | None is to avoid the > requirement for a nil pointer in OCaml. If an external function wants to > return nil in order to indicate, for example that a certain resource is not > available, it can return None instead and this prevents dereferencing a nil > pointer in OCaml because the None cannot be dereferenced. Yes. This doesn't forbid the compiler from representing 'a option values as pointers. Indeed, the type system already enforces that the None case is handled and the representation of None and Some _ do not matter. That said, I agree with Gabriel Scherer : adding optimizations specific to 'a option might refrain people wanting to switch to more appropriate datatypes. However, would is be possible to “optimize away” all types of the form “type 'a t = X of 'a | A | B | ...” (with at most one non-constant constructor) ? Would it be worth doing ? Kind regards, Nicolas