News for hackers. Stuff that matters.
Re:The Smallest Thing in Go by Brian_K_White on Monday December 09, 2024 @12:20AM (#42363252)
How is that remarkable?

Does it have some other actual function and this article is only saying how btw it can also be used to make ersatz enums?

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.