5 ms·
Even in type inferred languages they serve some use, namely in avoiding mis-typed variable names. Languages which require "var" make a distinction between the
by axiomabsolute 12y ago
Even in type inferred languages they serve some use, namely in avoiding mis-typed variable names. Languages which require "var" make a distinction between the intent of declaring a new variable vs setting the value of an existing variable, and so are able to catch instances where the programmer tries to set a non-existent variable.
- vorg 12y agoOr more tersely use := and = to distinguish them.