+ 1 Alexandre
On 24 Dec 2008, at 07:11, Michael Rueger wrote: > On Wed, Dec 24, 2008 at 10:58 AM, <[email protected]> wrote: > >> This is a language design point. Is the convenience of knowing that >> an argument is never modified worth more than the convenience of >> being >> able to modify the argument? > > What really is the convenience of modifying an argument? Having not to > think up another name? I never understood this argument especially if > you need to use the original value of the argument in several places. > > IMHO it is all about how much mental load reading code imposes (the > readability Stephane mentioned). > > If we allow modification of arguments, then I can't just look at code > and "know" that the argument has the value it was passed. > > Same with shadowed variables, a truly horrible idea. I look at code > and see an inst var, but fail to notice it is also an argument or > method var and I'm off being confused about what the code does. > > Same for upper/lowercase conventions, let alone uppercase method > names. > > Breaking the kind of conventions makes you think harder about what > code does and that distracts you from what you really trying to do. Or > should be doing ;-) > > Michael > > _______________________________________________ > Pharo-project mailing list > [email protected] > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project > -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. _______________________________________________ Pharo-project mailing list [email protected] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
