3 ms·
The critical difference is that an Option<T> is not a T, but a nil pointer is still a pointer. The stylistic difference is that the Rust type is semantic: your
by couchand 5y ago
The critical difference is that an Option<T> is not a T, but a nil pointer is still a pointer.
The stylistic difference is that the Rust type is semantic: your optional values are Options. The Go type is silly: why does being a pointer (which is allowed to be nil) imply required?