Hacker News new | past | comments | ask | show | jobs | submit login

Sigh. Yes, everyone knows what the goal is. But that goal is in conflict with the design decisions made in Go, and there's no clear path forward. You're not responding at all to the actual implications of types without zero values. There's no such thing as a "type that cannot be sent over a channel" or "a type that cannot be a map value" or "a type that when added anywhere in a composite type prevents omitting fields in composite literals" or "a type that cannot be comma-ok type asserted to". And it's highly unlikely such concepts will be added to the spec.

You'd have to start by constructing replacements for all those mechanisms, then migrate all Go source code in the world over to the new APIs, just to enable Go to have types without zero values.




Consider applying for YC's Summer 2025 batch! Applications are open till May 13

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: