3 ms·
If they’re trade offs, why is the Go team making proposals to add genetics and result types? Trade offs are one thing, defecencies are another. And if you can
by ilovecaching 8y ago
If they’re trade offs, why is the Go team making proposals to add genetics and result types?
Trade offs are one thing, defecencies are another.
And if you can think of a reason why hard coding multivalue return signatures would be better than a tuple type, then I’d like to hear it.
- skywhopper 8y agoYou've not really indicated how a multi-value return signature is even _different_ than a tuple type.
- ilovecaching 8y agoA tuple is a type constructor. A multi value return is not a type. It’s a semantic hard coded into the language spec. If you have tuples, you don’t have to add that special case to the language. You can also type alias a tuple, store it as a value, and just generally treat it like any other type.