Bar overriding predeclared Go identifiers

The existence of this tool seems to indicate a safety/security risk in Go:

There are plenty of other identifiers one could use, so I would prefer that the Go compiler lean towards safety and prohibit overriding the definitions of these critical identifiers.

Have you run into some real world situation where this is a problem? Or what is the security risk?

Having them as predeclared identifiers instead of keywords, and thus allowing redefinition of them in smaller scopes, means that new ones can be introduced and not break existing code. This is valuable.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.