Skip to content

Latest commit

 

History

History

Conflict-with-aliases

Conflict with aliases

This issue is similar to Too-simple-function-names. It shows that the same problem is possible in script modules.

If a module function name X, exported or internal, is accidentally the same as an existing global alias and other module functions call X then this alias is invoked instead of the function X.

It looks like a good idea to use the Verb-Noun convention even for internal module function names. This minimizes chances of conflicts. Aliases are not normally called Verb-Noun.

If a script defines aliases in its script scope then these aliases become global if the script is invoked in the global scope. This explains the differences between the test 1 (no conflicts) and 2 and 3 (conflicts).

Scripts