Re:The Smallest Thing in Go
by akira2501 on Monday December 09, 2024 @01:00AM
(#42363408)
> make ersatz enums?
The author is describing 'iota'. You can easily combine this technique with a custom type wrapper which provides the "full enum" if that's actually what you need. In which case this provides a level of capability and convenience above that of C.
In practice, it really is quite remarkable, when you first use it to it's fullest extent.
The author is describing 'iota'. You can easily combine this technique with a custom type wrapper which provides the "full enum" if that's actually what you need. In which case this provides a level of capability and convenience above that of C.
In practice, it really is quite remarkable, when you first use it to it's fullest extent.