4 ms·
> although I don't think the approach taken is very good The approach taken is the same as in virtually every other language that has avoided the billion dolla
by jibal 1y ago
> although I don't think the approach taken is very good
The approach taken is the same as in virtually every other language that has avoided the billion dollar mistake -- null is not a valid pointer value, and instead there's an additional union type (called Optional, Maybe, etc.) that can hold Some(pointer) or None. Zig, like some other languages, extends this union beyond pointers to other types.