Skip to content
Better HN
Top
New
Best
Ask
Show
Jobs
Search
⌘K
undefined | Better HN
0 points
planb
4y ago
0 comments
Share
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".
0 comments
default
newest
oldest
dharmab
4y ago
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`
mseepgood
4y ago
"any" is a new identifier, not a keyword. The usual shadowing rules apply.
j
/
k
navigate · click thread line to collapse