Comment

Comment by marcus_holmes

The points about iota are interesting. I always define the first constant as "unknown" when defining a set of iota-driven constants. That way the zero value is "unknown" so if I create a new struct with no initialiser it doesn't accidentally inherit a value I didn't mean it to have, and instead gets the "unknown" value.

It also doesn't touch on the other useful "system" funcs to include on a type (Scan, Value, Marshal, etc)

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton