Hacker News new | ask | show | jobs
by leafo 5287 days ago
Look at how MoonScript handles this: http://moonscript.org/reference/#the_using_clause_controllin...

I didn't want to change the default semantics, but I wanted to have a way for the programmer to be safe if they wanted to, so I created the `using` keyword for function declarations.

You explicitly declare what you intend to overwrite in the lexical scope, including overwriting nothing at all with `using nil`.