r/coffeescript • u/hh9527 • Aug 05 '14
Add explicit local var defination to coffee?
It is a proposal to fix the problem with implicit scoping in coffee.
coffee script like this
foo = (a, b; x, y = 0) -> blabla...
will compiled to
var foo; foo = function(a,b) { var x, y = 0; blabla... }
0
Upvotes
2
u/Piercey4 Aug 05 '14
Edit: I completely miss-read your code.
You should never use semi-colons in coffee-script.
Please elaborate more what you are trying to accomplish?
3
u/HelloAnnyong Aug 05 '14
This topic is the most bikeshedded discussion in the world. I can't remember the last time I had a legitimate reason to shadow a variable.
0
u/[deleted] Aug 05 '14
[deleted] — view deleted comment
2
u/[deleted] Aug 05 '14
[removed] — view removed comment