3 ms·
Having proper support for option or sum types is an orthogonal question to if it is object oriented or not. Crystal is an OO language that have sum types, for e
by yxhuvud 8y ago
Having proper support for option or sum types is an orthogonal question to if it is object oriented or not. Crystal is an OO language that have sum types, for example (and yes, nil is separated from other types, so a method returning a Duck will really do that, and it won't return nil unless the signature would be Duck | Nil).