Four static scoping violations in ES5 sloppy

Domenic Denicola domenic at
Sun Mar 17 20:44:38 PDT 2013

I went back to this old es-discuss thread:

which references a video segment from Mark Miller:

giving four static scoping violations:

1. implicit global variable creation
2. `with`
3. `delete`ing free variables
4. `eval` introducing local bindings

2 and 4 make perfect sense, but I don't understand how 1 and 3 interfere with static scoping. In particular, given a language with no `with` and with ES5-strict semantics for `eval`, I was unable to contrive scenarios where implicit global variable creation or `delete`ing a free variable introduced an ambiguity in the scope chain that prevented static knowledge of what an identifier referred to.

Does anyone have any idea how 1 and 3 interfere with static scoping?

More information about the es-discuss mailing list