Re: Switch - Case Statement Questions

From: Date: Wed, 21 Nov 2012 19:45:20 +0000
Subject: Re: Switch - Case Statement Questions
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-319752@lists.php.net to get a copy of this message
On Nov 19, 2012, at 2:46 PM, Stuart Dallas <stuart@3ft9.com> wrote: > On 19 Nov 2012, at 19:35, Tim Streater <tim@clothears.org.uk> wrote: > >> On 18 Nov 2012 at 14:44, Jim Giner <jim.giner@albanyhandball.com> wrote: >> Just so. Perhaps those who are not grasping the point could re-read their copy of "The >> Elements of Programming Style" by Kernighan and Plauger where this sort of issue is covered. > > And of course, nothing is allowed to have changed since 1978! Using a switch in that manner is > normal for me. Should I change my style simply because you don't agree with it? If so, why > don't you change your style because I don't agree with that? Code is art; there is no > "right" way to do it. Can code be shown to be more efficient, elegant, faster, cleaner? > Yes. Right or wrong? No. +1 for me as well. Publish data -- January 11, 1976??? This may be your father's book (or grand-father in my case). So, don't confuse me with old facts -- buy new ones. Just look to other languages (such as JAVA) for variations in switch. I think php got it right. After all, while(), if(), do/while() and even for() work around the concept of true -- why not switch? Cheers, tedd PS: We've had this conversation many years ago (but not as far back as 1976). _____________________ tedd@sperling.com http://sperling.com

« previous php.general (#319752) next »