|
|
|
|
|
by tialaramex
293 days ago
|
|
I think maybe your fundamental misunderstanding was just a misreading of what I actually wrote? I don't like @Nullable (or the ? syntax used in C# for example) because they're a special case magic. They handle exactly one narrow idea (Tony's Billion Dollar Mistake, the "null" pointer) and nothing else. I prefer sum types - both Option<T> and T | null are syntax for sum types. The former, which Rust has, is an explicit generic type, while the latter is an ad hoc typing feature. I don't have a strong preference between them. |
|