On Dec 9, 12:54 pm, Todd Benson <caduce... / gmail.com> wrote: > On Dec 9, 2007 11:39 AM, Dumaiu <Dym... / gmail.com> wrote: > > > On Dec 9, 12:19 pm, Todd Benson <caduce... / gmail.com> wrote: > >> > To be fair, it has to be said that it is less of a problem in > > languages that require variables to be declared or typed. > > Hmm. Maybe, but I kind of doubt it. var temp is no more or less > succinct than anything else. It doesn't guarantee you "safeness". > Safeness is what databases are for. Pre-declaration is sort of an > empty promise in flow-control. Do you really, truly believe this? I'm going to argue this point. I'm not saying that predeclaration is innately good: the disadvantages, whatever they be, might outweigh the advantages. The only 'promise' I can see it making is that the kind of error that started this discussion will be less likely. After writing var list = create_useful_list writing liist = modify_list will report an error. Actually, because it is more succinct. My reasoning is as follows: if someone thinks declarations are merely pointless, he might not use them himself but won't object to others using them. If he objects on principle, it's because he thinks they clutter the code. Performance aside, declarations are disliked because they take up space and are annoying to write. They're annoying to write because it takes extra effort; the extra effort makes it less likely that it'll happen by accident. It doesn't 'guarantee you "safeness,"' it just guarantees you a little more safety. -Jonathan