3 ms·
I think the point is that it would be nice to be able to express the idea of a value not being present without having to risk accidentally trying to dereference
by saghm 5y ago
I think the point is that it would be nice to be able to express the idea of a value not being present without having to risk accidentally trying to dereference a nil pointer. That's what Option brings to the table, although arguably Go could just provide an implementation of that like they do for slices and maps without actually having to introduce full generics to the language.