Re: Assign multiple variables from mysql_fetch_row() call

From: Date: Thu, 06 Sep 2001 01:50:07 +0000
Subject: Re: Assign multiple variables from mysql_fetch_row() call
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-66142@lists.php.net to get a copy of this message
> Hehe... and to think this whole line of discussion started because > someone advocates list() over () when the latter, IMO, is better because > the former is redundant. That's what it comes down to, really. *shrug* Most syntax is redundant. ($var1, $var2) = foo(); might as well be written as: var1,var2=foo No point having the brackets there. The spaces are also redundant of course. And so are the dollar signs. You could continue along these lines until you determine that all scripting languages are redundant and you might as well code directly in C until you discover C is redundant as well and go straight to assembly. Scripting languages exist exactly because they are higher-level (redundant if you will) layers that present more human-friendly interfaces to the underlying complexities. Removing all redundancy in a scripting language and turning it into a series of 1 or 2 character mneumonics almost completely eliminates the whole reason for using a scripting language. Once you learn this set of meaningless mneumonics you can get things done a bit quicker than someone using a more verbose language. However, consider why computers don't ship with stenograph-style keyboards. An experienced stenographer can type circles around any regular typist, but the learning curve for becoming an experienced stenographer is rather steep. It makes more sense to ship computers with keyboards that don't require such a learning curve. Just like it makes sense to keep the amount of magic meaningless mneumonics to a minimum in a scripting language. -Rasmus

« previous php.general (#66142) next »