| ▲ | mirekrusin 3 hours ago | |
This suggestion fails for values that can be null, need to be mutable or need references from multiple places etc – it's not "just performance penalty". Go has a problem, "just remember to always do X, never Y" patterns can't be guaranteed across all libraries you use, can't be enforced, can be violated for good reasons, other patterns and as a mistake etc etc. Shame because otherwise it's a great language, but some mistakes are just no-go. So close indeed. They need Go 2 with *T and ?*T - that would be nice language to use. | ||
| ▲ | pjmlp 2 hours ago | parent [-] | |
The best approach is to use other programming languages with more open minded approach to modern type systems, and leave Go to the use cases where there is no alternative due to existing adoption. Go 2 will never happen, they will keep incrementing 1.x until end of current computing model. | ||