Comment

Comment by wolframhempel

I'm really not a fan of the "initialize with empty value" approach. Especially when handling user input, e.g. marshalling JSON onto a struct, Go makes it impossible to distinguish between the user setting a value to 0 and the user not specifying the field. Instead, you end up with awkward "pointer to int" constructs to allow for nil checks. I'd love to have a "undefined" value instead.

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton