"John W. Krahn" wrote: > > Jon Molin wrote: > > > > Jan Gruber wrote: > > > > > > Hi, Jon && list ! > > > On Friday 01 March 2002 11:29 am, you wrote: > > > > Hi list! > > > > > > > > I've always thought there's a difference between for and foreach, that > > > > for uses copies and foreach not. But there's no diff is there? > > > > > > AFAIK there's not really a difference between these two. > > > > > > It merely depends on your preferences, readable/maintanable code vs > > > quick && dirty. > > > > if there's no difference, what's the point of having both? I can't see > > how readable/maintanable would increase by adding functions with the > > same name, it'd rather increase the confusion... > > > > is there really no diff? > > FWIW Perl1 didn't have foreach, it was added in Perl2. From the Perl2 > Changes file: > > New iterator for normal arrays, foreach, that allows both read and > write:
But if there's no difference why was it added? I understand 'TMTOWTDI' and i agree that there should be, but adding aliases isn't adding ways to do things, just other ways to spell them :) adding whiletrue as an alias to while wouldn't add anything but confusion... So i take it, from start there was a difference but what could be done in foreach was added to for and foreach was made n alias, or? Im sorry if you people see this as spam and/or offtopic, it's just that i feel as if i've lost my dear friend foreach, as the only difference from for is four letters and i can't see no point in using it except for backwards compatiblity. /jon -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]