-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can we add var keyword back. thank you! #3121
Comments
|
By globe scope i mean the file cope. And did you mean i should write: 4 exports.queue_set = 'queue_set' If not for line 1 - 3, what's the difference between line 3 and line 4. Whey line 4 should be written this way. And I think when programmer change a variable in a local function, they always mean to write a local var instead of the globe one even there's a globe one with the same name. Now in coffee, the logic weird:
The steps are totally opposite to what it should be.
In current coffee implementation. even i don't change a function definition. just adding a globe var can destroy my functions' logic, because the new var's name may conflict with current using local variables. Please give the ticket link that points to the reason why coffee doing that unusual way. Thank you. |
I don't think I really get what you mean. By "globe/global variable", you mean "upperscope variable"? Global variables in node are variables attachee to Please use three backticks (```) for your code See #2697 |
By global variable. i mean file scope variable. see example: n = 1
function_one = ->
console.log n n is a file scope variable. not real global as only functions/classes in the file can access it. I have post an example to ticket #2697 to illustrate what i mean. |
Can we add a feature so that i can use 'var' in my function definition to override the globe variable with the same name?
This will be much helpful for our daily life. Can not override globe var is quite danger!
The text was updated successfully, but these errors were encountered: