ZILtoid1991@lemmy.world to Programmer Humor@programming.dev · 1 month agoMade this after someone noticed her face looked like PirateSoftwareimagemessage-square61linkfedilinkarrow-up1235arrow-down134
arrow-up1201arrow-down1imageMade this after someone noticed her face looked like PirateSoftwareZILtoid1991@lemmy.world to Programmer Humor@programming.dev · 1 month agomessage-square61linkfedilink
minus-squareRustyNova@lemmy.worldlinkfedilinkarrow-up6·1 month 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
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