ZILtoid1991@lemmy.world to Programmer Humor@programming.dev · 29 days agoMade this after someone noticed her face looked like PirateSoftwarelemmy.worldimagemessage-square56linkfedilinkarrow-up1224
arrow-up1224imageMade this after someone noticed her face looked like PirateSoftwarelemmy.worldZILtoid1991@lemmy.world to Programmer Humor@programming.dev · 29 days agomessage-square56linkfedilink
minus-squareZILtoid1991@lemmy.worldOPlinkfedilinkarrow-up9·29 days agoEnums in Rust are spicier unions, and Rust boosters like to paint it as the perfect way to do it, because it’s the best language ever, with no faults. If you disagree, they’ll try to frame you as a Lunduke fan and a bigot.
minus-squareRustyNova@lemmy.worldlinkfedilinkarrow-up6·29 days agoNever said that. In fact, enums have lots of issues that can add a lot of boilerplate code. But actually having data associated with the type system instead of just a flag is a lot more powerful and less prone to errors than classic enums You can also put functions on this union type that allows easy abstraction of what state the union is in
Please elaborate.
Enums in Rust are spicier unions, and Rust boosters like to paint it as the perfect way to do it, because it’s the best language ever, with no faults. If you disagree, they’ll try to frame you as a Lunduke fan and a bigot.
Never said that. In fact, enums have lots of issues that can add a lot of boilerplate code.
But actually having data associated with the type system instead of just a flag is a lot more powerful and less prone to errors than classic enums
You can also put functions on this union type that allows easy abstraction of what state the union is in