Le mardi 18 février 2014 à 11:02 -0800, baaph a écrit : > Thanks to the Julia developers for the great work! Really impressive! > > > One source of errors, when writing programs in dynamic languages (as > for instance Python or Julia), is that assignment silently creates a > new variable. Whereas the used of an undefined variable on the RHS is > caught as an error, a mis-spelled variable name on the LHS simply > creates an new unintended variable.This error can be difficult to find > in large programs. I suggest that there should be an additional > assignment operator (for instance ".=") which raises an error if the > LHS variable does not exist. (Actually I think it would be preferable > to have ":=" for assignment and creation of a new variable and "=" for > assignment. This is possibly too late....) There's also a transparent and simpler solution: have a code checker which warns when a variable is assigned to, but not referenced anywhere in subsequent code. That should catch all cases where you make one typo -- if you make twice the same typo it could miss it depending on the operations involved.
Regards
