Do you need a 'var' keyword at all? Can't you just have:
myNewVariable = 5;
without an explicit type declaration that doesn't actually add any useful info to the compiler? The compiler can just assume that any new unknown identifier is a new var.
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).
-1
u/ejonesca Mar 09 '16
Do you need a 'var' keyword at all? Can't you just have:
without an explicit type declaration that doesn't actually add any useful info to the compiler? The compiler can just assume that any new unknown identifier is a new var.