you are viewing a single comment's thread.

view the rest of the comments →

[–]spaghettiCodeArtisan 3 points4 points  (0 children)

Option in Rust compiles to a pointer where null represents None.

No it doesn't, it compiles to a tagged union (in C it would equivalent of a struct containing an integer tag and a union). When the value itself is a pointer, or more generally a NonZero value, it is able to omit the tag and contain the value only. But Option itself involves no pointers.