News for hackers. Stuff that matters.
Re:Go and Simplicity Debt Redux by codebje on Monday June 19, 2017 @12:08AM (#14584581)
A maybe<T> in a language with halfway decent support for sum types is most likely a tagged pointer to a T, if it is reified at all.

A clever compiler is likely to do the same thing for a pair of (bool, T): represent the bool as a tag in the pointer, store the T. If the value is reified at all.

What new run-time failure modes do you get with optional? Is it just what happens when you blithely ignore the "nothing" possibility and attempt to extract the contained value "on faith" ?

There are no comments on this comment yet.