IssueRaiser

A better question is how useful is let at all?

A better question is how useful is let at all? Having two different variable scoping rules with no way to know which one a variable is using without backtracing sounds like a maintenance nightmare. I understand what is it good for, but it seems like we are replacing a small problem with a bigger problem. An even better question is why not get rid of var and make every variable local to its parent function? To alter globals, use the window object explicitly.

Posted by protonfish on Jun 1, 2015, 4:13 PM

Tags

Related issues

Raise real-world problems, find people facing the same issue, and discuss solutions.6,000 issues0 comments

hackernews (Other)

A better question is how useful is let at all?

protonfishJun 1, 2015, 4:13 PM

A better question is how useful is let at all? Having two different variable scoping rules with no way to know which one a variable is using without backtracing sounds like a maintenance nightmare. I understand what is it good for, but it seems like we are replacing a small problem with a bigger problem. An even better question is why not get rid of var and make every variable local to its parent function? To alter globals, use the window object explicitly.

Comments (0)

No comments yet. Start the discussion.

Comment on this issue