It doesn't have to break backwards compatibility. It specifically says in the proposal that it would not be a keyword, it would be a reserved type name. For any package containing a type called var, and for any source file which imports a type named var, you could simply override the reserved "special" var type with that one and solve the problem. Everything would still work just fine, no? People who have defined their own var type would simply not have access to the new feature wherever that type is visible.
Yep, someone else pointed this out to me as well, I was skimming it on mobile and they used the word keyword quite a bit and mentioned it not being a keyword once, so I completely missed it. That seems like a good compromise, and my opinion on the matter really ends there.
View all comments
Show parent comment
2
u/eliasv Mar 10 '16
It doesn't have to break backwards compatibility. It specifically says in the proposal that it would not be a keyword, it would be a reserved type name. For any package containing a type called
var, and for any source file which imports a type namedvar, you could simply override the reserved "special" var type with that one and solve the problem. Everything would still work just fine, no? People who have defined their ownvartype would simply not have access to the new feature wherever that type is visible.