Re:Using enums to represent state in Rust
by bombela on Saturday September 23, 2023 @12:02AM
(#37620493)
Syntactic sugar to avoid the variant where there is only one, not only where used, but also when declared: enum Foo { Foo{...} }, what to do with the second Foo. And what about FFI (foreign function interface) where you have to maintain ABI compatibility over time. Factor all of that in, and it turns out Rust already has syntax for all of that: struct Foo {}.
[ Parent
| on HN ]
There are no comments on this comment yet.