30
you are viewing a single comment's thread
view the rest of the comments
[-] TehPers@beehaw.org 2 points 1 week ago* (last edited 1 week ago)

While I agree with you that anonymous sum types are useful, the language designers tend to avoid anything that might include a hidden cost (in this case either the size of the enum or cost of boxing). Something along those lines might end up in the language eventually, though.

this post was submitted on 07 Oct 2026
30 points (100.0% liked)

Rust

8329 readers
18 users here now

Welcome to the Rust community! This is a place to discuss about the Rust programming language.

Wormhole

!performance@programming.dev

Credits

  • The icon is a modified version of the official rust logo (changing the colors to a gradient and black background)

founded 3 years ago
MODERATORS