C.
typedef struct{int filled; union{void* data;} val;} maybe; typedef struct{int filled; union{void* data;} val;} maybe;To do something like x.get() in Scala when x is empty is a runtime error, not a compile-time error.