What's strict mode? And more importantly, how does it work in CoffeeScript 1.3.x?
Mozilla Developer Network (MDN) defines ECMAScript 5 strict mode
as "a way to opt in
number of areas, ranging from the commonplace (global variable leaks) to
the arcane (numeric octal literals). It also signals security issues.
Resig's post on strict mode
additional help do we get from strict mode? Alex MacCaw has written this
up nicely in the "Strict mode" section of The Little Book on CoffeeScript, Chapter 7, The Bad Parts
For the final word on the feature, read the CoffeeScript project issue on GitHub
. Jeremy Ashkenas' comment on the issue is noteworthy: "I think if we do this, we enforce our static strict mode restrictions everywhere, but we do not
put any "use strict"directives
into your code for you." In other words, the CoffeeScript compiler does
the strict mode syntax checks itself, at compile time. This is good.
discover your errors.