Re:The Serde Rust Framework
by bpicolo on Thursday October 14, 2021 @08:36PM
(#28872317)
Don't you do that in rust too? You'd be working with Option<T> instead of T.
[ Parent
| on HN ]
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?
Re:The Serde Rust Framework
by mcintyre1994 on Friday October 15, 2021 @03:37AM
(#28875345)
Option<Int> is a really good way to describe a field that if present is an int, but may not be present, though. Pointer isn't.