Re:Rust for JavaScript Developers – Pattern Matching and Enums
by steveklabnik on Sunday July 12, 2020 @12:49PM
(#23812690)
Not the author, but yes, this is because the thing between "let" and "=" is a pattern, the exact same thing used in match, and in other places. For example, function arguments!
But I wouldn't inherently say that's the reason, it's also because structs are nominally rather than structurally typed.
[ Parent
| on HN ]
There are no comments on this comment yet.