Re: [PHP-DEV] switch labels in sub-blocks

2004-05-29 Thread Ilya Sher
Sara Golemon wrote: Well, now that I think I understand what is it for, I'm pretty sure it's not very appropriate for PHP(, unless someone will provides an example of the opposite of course). It's kind of clarity vs efficiency. The more the basic operation ("*to = *from++" in the original) is getti

Re: [PHP-DEV] switch labels in sub-blocks

2004-05-29 Thread Sara Golemon
> Well, now that I think I understand what is it for, > I'm pretty sure it's not very appropriate for PHP(, > unless someone will provides an example of the opposite > of course). > > It's kind of clarity vs efficiency. > The more the basic operation ("*to = *from++" in the > original) is getting b

Re: [PHP-DEV] switch labels in sub-blocks

2004-05-29 Thread Ilya Sher
Michael Walter wrote: [snip] It's an unrolled loop. See http://www.lysator.liu.se/c/duffs-device.html for more information for more elaboration from the author (google works for you, too, btw). Thanks. Got it now. [Somehow did not think of google. My fault. Was kind of confused. The first link giv

Re: [PHP-DEV] switch labels in sub-blocks

2004-05-29 Thread Michael Walter
Ilya Sher wrote: Hartmut Holzgraefe wrote: Ilya Sher wrote: It looks like using "goto" to me. Messy. That's probably the reason it is not allowed. Or maybe other people like myself failed to understand how it is really useful. Real example from you would help here. it's a valid performance trick i

Re: [PHP-DEV] switch labels in sub-blocks

2004-05-28 Thread Ilya Sher
Hartmut Holzgraefe wrote: Ilya Sher wrote: It looks like using "goto" to me. Messy. That's probably the reason it is not allowed. Or maybe other people like myself failed to understand how it is really useful. Real example from you would help here. it's a valid performance trick in C Thanks for th

Re: [PHP-DEV] switch labels in sub-blocks

2004-05-28 Thread Hartmut Holzgraefe
Ilya Sher wrote: It looks like using "goto" to me. Messy. That's probably the reason it is not allowed. Or maybe other people like myself failed to understand how it is really useful. Real example from you would help here. it's a valid performance trick in C http://www.jargon.net/jargonfile/d/Duffs

Re: [PHP-DEV] switch labels in sub-blocks

2004-05-28 Thread Ilya Sher
Ard Biesheuvel wrote: Hi all, is there a specific reason why nested blocks in switch statements are not supported ? It can be very useful if you want to jump into the middle of the first iteration of a loop (like fetching rows from a result set where the first row might or might not be already p