4 ms·
Sure, I appreciate that concurrent GCs are hard. For interfaces, the Go team chose one of a number of possible solutions: https://github.com/golang/go/issues/84
by foldr 2y ago
Sure, I appreciate that concurrent GCs are hard. For interfaces, the Go team chose one of a number of possible solutions: https://github.com/golang/go/issues/8405 https://github.com/golang/go/issues/8405 If the language were to add support for union types, these tradeoffs could potentially be revisited.
Other commentators have pointed out that nil is a perfectly good default value for a union (if it's underlyingly an interface).