Four static scoping violations in ES5 sloppy

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


I went back to this old es-discuss thread:

http://www.mail-archive.com/es-discuss@mozilla.org/msg18408.html

which references a video segment from Mark Miller:

http://www.youtube.com/watch?v=Kq4FpMe6cRs&t=42m53s

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