News for hackers. Stuff that matters.
Re:Go Replaces Interface{} with 'Any' by planb on Wednesday December 15, 2021 @01:06AM (#29562653)
Was "any" a reserved word in Go before? Because if not, this would be a breaking chnage for all code that uses a var named "any".
Re:Go Replaces Interface{} with 'Any' by dharmab on Wednesday December 15, 2021 @01:27AM (#29562769)
I just tested on the dev branch and you can still use variables named `any`. The compiler is smart enough to tell variable names and types apart. You can even create a variable named any with type any with `var any any`
Re:Go Replaces Interface{} with 'Any' by mseepgood on Wednesday December 15, 2021 @02:33AM (#29563055)
"any" is a new identifier, not a keyword. The usual shadowing rules apply.