Re: [PHP-DEV] Re: How to build a real Trait thing without exclusion and renaming

2008-02-27 Thread Stefan Marr
Hi Joshua, Joshua Thompson schrieb: trait A { public function smallTalk() { return 'a'; } public function bigTalk() { return strtoupper( $this->smallTalk() ); } } trait B { public function smallTalk() { return 'b'; } public function bigTalk() { return strtoupper( $t

Re: [PHP-DEV] PHP footprint and sharing code among SAPI binaries

2008-02-27 Thread Antony Dovgal
On 26.02.2008 23:48, Eugene San wrote: > 1) Is there any reason to link all PHP SAPI modules statically with all > PHP objects? In most cases you need only one SAPI, so there is no reason to share something. > 2) Is it possible to extract all shared functionality to shared object > and links al

Re: [PHP-DEV] Re: How to build a real Trait thing without exclusion and renaming

2008-02-27 Thread Richard Quadling
On 27/02/2008, Joshua Thompson <[EMAIL PROTECTED]> wrote: > > // now to the questions > $talker = new Talker(); > echo $talker->talk(); // What does this echo? My assumption is 'B'. > echo $talker->bigTalk(); // How about this? > echo $talker->smallTalk(); // This should be 'b'. Wouldn't tra

Re: [PHP-DEV] Re: How to build a real Trait thing without exclusion and renaming

2008-02-27 Thread Lukas Kahwe Smith
On 26.02.2008, at 04:19, Gregory Beaver wrote: My only objection is that this introduces two new keywords, trait and instead. In addition, this can get very awkward if multiple traits (more than 2) implement the same method name. I would prefer a simple recycling of the "=" sign for both use

Re: [PHP-DEV] How to build a real Trait thing without exclusion and renaming

2008-02-27 Thread Richard Quadling
On 27/02/2008, Stefan Marr <[EMAIL PROTECTED]> wrote: > Hi Richard, > > Richard Quadling schrieb: > > > Traits as namespaces would solve the issue of conflict in the class > > Talker (you would have to explicitly say which trait the method came > > from. > > Yes, this would solve the conflicts,

Re: [PHP-DEV] Re: How to build a real Trait thing without exclusion and renaming

2008-02-27 Thread Gregory Beaver
Lukas Kahwe Smith wrote: > > On 26.02.2008, at 04:19, Gregory Beaver wrote: > >> My only objection is that this introduces two new keywords, trait and >> instead. In addition, this can get very awkward if multiple traits >> (more than 2) implement the same method name. I would prefer a simple >>

Re: [PHP-DEV] How to build a real Trait thing without exclusion and renaming

2008-02-27 Thread Stefan Marr
Hi Richard, Richard Quadling schrieb: Traits as namespaces would solve the issue of conflict in the class Talker (you would have to explicitly say which trait the method came from. Yes, this would solve the conflicts, but is this really handy? Every explicit reference to a trait/class name has

Re: [PHP-DEV] Re: How to build a real Trait thing without exclusion and renaming

2008-02-27 Thread Jochem Maas
Hi, I had a thought about recursion (and self referencing) inside trait defined functions and the possible issues that might occur due to explicit/implicit conflict resolution and or aliasing/renaming (i'm not completely following what the status quo is regarding conflict resolution and/or aliasi

Re: [PHP-DEV] Re: How to build a real Trait thing without exclusion and renaming

2008-02-27 Thread Stefan Marr
Lukas Kahwe Smith schrieb: class Talker { use A, B, C, D { smallTalk = A::smallTalk; // this says that if B, C or D implement smallTalk, it is ignored talk = A::bigTalk; } } Well this is not just a different syntax, but an entirely different approach. In Stefan's proposal one had to ex

Re: [PHP-DEV] get_magic_quotes_gpc, get-magic-quotes-runtime in head, get a "final" decision

2008-02-27 Thread David Zülke
Guys, what's the verdict on this one? Right now, many already have if(function_exists('get_magic_quotes_gpc') && get_magic_quotes_gpc()) in their code. Now with the latest 5.3, that throws an E_STRICT! Seriously, is that necessary? David Am 05.02.2008 um 21:23 schrieb Pierre Joye: Hi,

Re: [PHP-DEV] get_magic_quotes_gpc, get-magic-quotes-runtime in head, get a "final" decision

2008-02-27 Thread Pierre Joye
Hi David, On Wed, Feb 27, 2008 at 4:52 PM, David Zülke <[EMAIL PROTECTED]> wrote: > Guys, > > what's the verdict on this one? Right now, many already have > > > if(function_exists('get_magic_quotes_gpc') && get_magic_quotes_gpc()) > > in their code. > Now with the latest 5.3, that throws an E_

Re: [PHP-DEV] get_magic_quotes_gpc, get-magic-quotes-runtime in head, get a "final" decision

2008-02-27 Thread David Zülke
Am 27.02.2008 um 17:03 schrieb Pierre Joye: Hi David, On Wed, Feb 27, 2008 at 4:52 PM, David Zülke <[EMAIL PROTECTED]> wrote: Guys, what's the verdict on this one? Right now, many already have if(function_exists('get_magic_quotes_gpc') && get_magic_quotes_gpc()) in their code. Now with t

Re: [PHP-DEV] get_magic_quotes_gpc, get-magic-quotes-runtime in head, get a "final" decision

2008-02-27 Thread Pierre Joye
Hi David, On Wed, Feb 27, 2008 at 5:19 PM, David Zülke <[EMAIL PROTECTED]> wrote: > I know, but IIRC, Andi or someone else suggested that there should be > a warning in 5.3, but that was not discussed further. Because adding a waring in 5.x is a no-no. > I mean, really, what's the point? I h

Re: [PHP-DEV] get_magic_quotes_gpc, get-magic-quotes-runtime in head, get a "final" decision

2008-02-27 Thread Lokrain
Hello David, > telling us what we already know. I am not quite sure, that all developers, for example the junior one, know that.

Re: [PHP-DEV] Re: How to build a real Trait thing without exclusion and renaming

2008-02-27 Thread Lokrain
Hi Gregory and others, Traits rox! I will never use them cause I think in different way, but for many people this will be a great feature. Gregory, the comment you added here: OK, since none of my suggestions are acceptable, let me put it this way: Childish story! I want my toy! I am fully +1

Re: [PHP-DEV] get_magic_quotes_gpc, get-magic-quotes-runtime in head, get a "final" decision

2008-02-27 Thread David Zülke
Am 27.02.2008 um 17:25 schrieb Lokrain: Hello David, telling us what we already know. I am not quite sure, that all developers, for example the junior one, know that. You mean my code should break because some ignorant noob is unaware that PHP6, which is still months or years away,

Re: [PHP-DEV] get_magic_quotes_gpc, get-magic-quotes-runtime in head, get a "final" decision

2008-02-27 Thread Pierre Joye
On Wed, Feb 27, 2008 at 5:48 PM, David Zülke <[EMAIL PROTECTED]> wrote: > You mean my code should break because some ignorant noob is unaware > that PHP6, which is still months or years away, will throw out magic > quotes? How a E_DEPRECATED will break your code? Please, I doubt there is a nee

Re: [PHP-DEV] PHP footprint and sharing code among SAPI binaries

2008-02-27 Thread Eugene San
Antony Dovgal wrote: On 26.02.2008 23:48, Eugene San wrote: 1) Is there any reason to link all PHP SAPI modules statically with all PHP objects? In most cases you need only one SAPI, so there is no reason to share something. 2) Is it possible to extract all shared functionality to

Re: [PHP-DEV] PHP footprint and sharing code among SAPI binaries

2008-02-27 Thread Antony Dovgal
On 27.02.2008 21:04, Eugene San wrote: >>> 3) Next issue is XML with DOM support, we where using LIBXML2 but that >>> costs ~2.5MB are there there options for supporting that? >>> >> >> What costs 2.5MB? >> Dynamic linking against libxml2.so? >> > Linking against libxml2 costs 0.4MB and li

Re: [PHP-DEV] PHP footprint and sharing code among SAPI binaries

2008-02-27 Thread Eugene San
Antony Dovgal wrote: On 27.02.2008 21:04, Eugene San wrote: 3) Next issue is XML with DOM support, we where using LIBXML2 but that costs ~2.5MB are there there options for supporting that? What costs 2.5MB? Dynamic linking against libxml2.so? Linking against libxml2

[PHP-DEV] Re: [PDO] [RFC] An Idea for PDO 2

2008-02-27 Thread David Sceppa
Greetings, PDO community! My name is David Sceppa and I am a program manager working at Microsoft on improving SQL Server for PHP data hosting. Let me first just say that Microsoft is very interested in participating in the PDO 2 effort and I plan to actively engage in the discussions of the s

[PHP-DEV] PHP 5.2.6RC1 Released for Testing

2008-02-27 Thread Ilia Alshanetsky
The first release candidate of 5.2.6 was just released for testing and can be downloaded here: http://downloads.php.net/ilia/php-5.2.6RC1.tar.bz2 (md5sum: 4c64775fac8a23259970f77d24e00de2) The Windows binaries should become available shortly as well. Please test this release against your

Re: [PHP-DEV] Re: [PDO] [RFC] An Idea for PDO 2

2008-02-27 Thread Larry Garfield
On Wednesday 27 February 2008, David Sceppa wrote: > The approach that's been described in proposals (vendor-built drivers can > be covered via CLAs while the core components remain CLA-free) is something > I believe to be in the best interests of both driver writers and the > developers who use P

RE: [PHP-DEV] How to build a real Trait thing without exclusion and renaming

2008-02-27 Thread Andi Gutmans
> -Original Message- > From: Stefan Marr [mailto:[EMAIL PROTECTED] > Sent: Monday, February 25, 2008 11:33 AM > To: internals Mailing List; Marcus Boerger > Subject: [PHP-DEV] How to build a real Trait thing without exclusion > and renaming > > > //here the new notion of combing traits and

RE: [PHP-DEV] PHP footprint and sharing code among SAPI binaries

2008-02-27 Thread Andi Gutmans
Hi Eugene, Do you want to have an option to exclude libxml2 and its related functionality from the build? If so, have you done the analysis of what pieces of PHP create this dependency? In general, for the typical Web developer the tight integration of XML is a positive thing but if it's a min

Re: [PHP-DEV] How to build a real Trait thing without exclusion and renaming

2008-02-27 Thread Joshua Thompson
Andi Gutmans wrote: Hi Stefan, I think the discussion is going in the right direction but personally I had to think really hard to figure out what this code was going to do :) The following is a suggestion which takes into account some of the discussions we've had including points both Lukas a

Re: [PHP-DEV] How to build a real Trait thing without exclusion and renaming

2008-02-27 Thread Stanislav Malyshev
Hi! trait MyDebug { local $counter = 1; IIRC we don't have keyword "local". Why not "private" or "static"? class MyClock { use MyDebug *; use MyTicks { timeInTicks = inTicks; This looks like code which does assignment. How I am supposed to understa

RE: [PHP-DEV] How to build a real Trait thing without exclusion and renaming

2008-02-27 Thread Andi Gutmans
> -Original Message- > From: Joshua Thompson [mailto:[EMAIL PROTECTED] > Sent: Wednesday, February 27, 2008 6:54 PM > To: internals@lists.php.net > Subject: Re: [PHP-DEV] How to build a real Trait thing without > exclusion and renaming > > I was working on a detailed RFC of something along

RE: [PHP-DEV] How to build a real Trait thing without exclusion and renaming

2008-02-27 Thread Andi Gutmans
> -Original Message- > From: Stanislav Malyshev [mailto:[EMAIL PROTECTED] > Sent: Wednesday, February 27, 2008 7:07 PM > To: Andi Gutmans > Cc: [EMAIL PROTECTED]; internals Mailing List > Subject: Re: [PHP-DEV] How to build a real Trait thing without > exclusion and renaming > > Hi! > > >

Re: [PHP-DEV] How to build a real Trait thing without exclusion and renaming

2008-02-27 Thread Stanislav Malyshev
This is just an example of being able to alias a method from a trait. Assuming two traits would use the same name this would give you the ability to include it under a different name. The point is we can alias but we can not remove. That's what I am asking - why alias? You have perfectly good na

Re: [PHP-DEV] How to build a real Trait thing without exclusion and renaming

2008-02-27 Thread Stefan Marr
Hi, Joshua Thompson schrieb: Andi Gutmans wrote: The following code shows a few things: - local properties which can be used in self-contained functionality. The storage is guaranteed to stay internal and will not clash with the aggregating class. Yes, it is a nice to have. - methods are by

RE: [PHP-DEV] How to build a real Trait thing without exclusion and renaming

2008-02-27 Thread Andi Gutmans
> -Original Message- > From: Stanislav Malyshev [mailto:[EMAIL PROTECTED] > Sent: Wednesday, February 27, 2008 11:21 PM > To: Andi Gutmans > Cc: [EMAIL PROTECTED]; internals Mailing List > Subject: Re: [PHP-DEV] How to build a real Trait thing without > exclusion and renaming > > > This is