satyr / coco

Unfancy CoffeeScript
http://satyr.github.com/coco/
MIT License
497 stars 48 forks source link

Proposal: warning or error when using an undefined variable #160

Open andrewrk opened 12 years ago

andrewrk commented 12 years ago
a = 3
b = a + c

expected output:

SyntaxError: reading from undefined "c" on line 2
andrewrk commented 12 years ago

Potential issues: using the window or require object.

Possible solutions:

satyr commented 12 years ago

Whitelisting is the hardest part. Can't you simply use JSHint?

andrewrk commented 12 years ago

Can't you simply use JSHint?

Problems: