Re: [PHP-DEV] New construct discussion Summary

2004-07-11 Thread Ilya Sher
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Marc Richards wrote: | Ok, so let me try to do a little summary. | | | If and When | --- | 1) There seems to be a general consensus that this feature should be | implemented in SOME way. | 2) It was too late for 5.0.0 so it will be targeted for

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 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-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 t

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

Re: [PHP-DEV] Why can constants only be scalars?

2004-05-13 Thread Ilya Sher
Sean Coates wrote: Ilya Sher wrote: We discussed this issue with Jevon Wright (private emails) and in the end of the day agreed that most simple yet powerful solution is "superglobals", which would work like $_GET,$_POST etc. This can be accomplished in user-space, by cheating th

Re: [PHP-DEV] Why can constants only be scalars?

2004-05-12 Thread Ilya Sher
Andi Gutmans wrote: [snip, text was about non-scalar constant] I don't see this as something which should be changed. Definitely not before 5.0 but I'm not sure it's that critical also to change afterwards although it might be possible. Andi We discussed this issue with Jevon Wright (private em

Re: [PHP-DEV] Why can constants only be scalars?

2004-05-10 Thread Ilya Sher
[snip] Same here. I have a number of static arrays that I use for reference data that are usually encapsulated in a function, or a global / session variable. It would be very handy to be able to define a constant array instead. - Gabriel = Agreed. Also using arrays of constants without a way

Re: [PHP-DEV] nested includes fails?

2004-05-04 Thread Ilya Sher
Ilya Sher wrote: Tumurbaatar S. wrote: 'common.php' contains some class definition and PHP5 fails with 'PHP Fatal error: Cannot redeclare class ... in common.php...' when script C.php starts. The file including map is: A.php: require_once(common.php) B.php: require_on

Re: [PHP-DEV] nested includes fails?

2004-05-03 Thread Ilya Sher
Tumurbaatar S. wrote: 'common.php' contains some class definition and PHP5 fails with 'PHP Fatal error: Cannot redeclare class ... in common.php...' when script C.php starts. The file including map is: A.php: require_once(common.php) B.php: require_once(common.php) C.php: require_once(A.php)

[PHP-DEV] Re: Function autoloading

2004-04-18 Thread Ilya Sher
Luna Kid wrote: [snip] (I bet anyone a dead rat that *lots* of authors of simple plugin-based designs (not needing real OOP stuff) would welcome function autoloading. In fact, many of us, I'm sure, had wondered cluelessly about how to do it with __autoload, before wondering cluelessly about why wa