Re:Go 1.18
by earthboundkid on Tuesday March 15, 2022 @02:00PM
(#30688650)
Yes, the only downside I see is that if you do:
The default value for n has to be nil, rather than 0, because Go can't choose between the types (int 0, int64 0, etc.). And of course, you can't do n + x (assuming x is also a Number) because x might be a different kind of number. Still, it's a pretty good simplification from the current restrictions, and it builds well on existing concepts.
[ Parent
| on HN ]
There are no comments on this comment yet.