MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/programming/comments/49prtn/var_keyword_proposed_for_java/d0tsr2o
r/programming • u/adila01 • Mar 09 '16
395 comments sorted by
View all comments
Show parent comments
19
good point
9 u/[deleted] Mar 09 '16 [removed] — view removed comment 7 u/Berberberber Mar 09 '16 Javascript's is weird, though. It doesn't declare the variable in current scope, it add it to the root object window. 4 u/immibis Mar 10 '16 Python then. 2 u/bloody-albatross Mar 10 '16 Plus these days you usually use a (editor integrated) linter that forbids creating global variables that way. However, Python and Ruby work that way (creating local variables just by normal assignment). 4 u/[deleted] Mar 10 '16 Python is another one with this lovely feature. 0 u/[deleted] Mar 09 '16 [deleted] 2 u/codebje Mar 09 '16 This is why kids should design programming languages. It's hard, and a great way to learn is to experiment.
9
[removed] — view removed comment
7 u/Berberberber Mar 09 '16 Javascript's is weird, though. It doesn't declare the variable in current scope, it add it to the root object window. 4 u/immibis Mar 10 '16 Python then. 2 u/bloody-albatross Mar 10 '16 Plus these days you usually use a (editor integrated) linter that forbids creating global variables that way. However, Python and Ruby work that way (creating local variables just by normal assignment). 4 u/[deleted] Mar 10 '16 Python is another one with this lovely feature.
7
Javascript's is weird, though. It doesn't declare the variable in current scope, it add it to the root object window.
window
4 u/immibis Mar 10 '16 Python then. 2 u/bloody-albatross Mar 10 '16 Plus these days you usually use a (editor integrated) linter that forbids creating global variables that way. However, Python and Ruby work that way (creating local variables just by normal assignment).
4
Python then.
2
Plus these days you usually use a (editor integrated) linter that forbids creating global variables that way. However, Python and Ruby work that way (creating local variables just by normal assignment).
Python is another one with this lovely feature.
0
[deleted]
2 u/codebje Mar 09 '16 This is why kids should design programming languages. It's hard, and a great way to learn is to experiment.
This is why kids should design programming languages. It's hard, and a great way to learn is to experiment.
19
u/ejonesca Mar 09 '16
good point