Dictu icon indicating copy to clipboard operation
Dictu copied to clipboard

Shadowing builtins has a weird effect

Open Jason2605 opened this issue 4 years ago • 0 comments

Shadowing

Summary

var input = [];
print(input); // <native fn>

Here we would expect the variable to take precedence over the built-in function, although shadowing is bad either way, the principle of least surprise would be that the built-in is overwritten, however currently it is not.

Jason2605 avatar Dec 01 '20 18:12 Jason2605