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".
[ Parent
| on HN ]
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`