News for hackers. Stuff that matters.
Re:Things Go needs more than generics by masklinn on Monday October 04, 2021 @12:19PM (#28748880)
> Also, to be abundantly clear, I think this is all a good thing. It is intrinsically part of the value of a sum type in a language that you're not forced to think about the modestly complicated memory layout such things entail. It is good that compilers have some special cases for when you're summing on small values.

Seems more likely you'd limit your enums to 256 entries and always use a byte than require a word by default, no?

niche-value optimisation is a much more complicated affair so it's unlikely as a baseline indeed.

There are no comments on this comment yet.