polarmobile/coffeescript-style-guide — Issue #3: top-level variables
Author: showell
Created: 2011-12-22 14:09:52+00:00
State: open

It might be worth mentioning a strategy to avoid naming collisions between variables at the top level scope of your file and local variables within more narrow scopes.

Some of this is already implicitly covered--if you name your classes CamelCase and your constants ALL_CAP_CASE, then you're unlikely to accidentally alias local variables.

If you have functions at top level scope, then there can be gotchas if they have the same name as local variables.

Thanks for publishing the style guide!