Re: [PHP-DEV] Traits expecting interfaces implicitly leads to expensive runtime checks

2010-12-10 Thread Nathan Nobbe
On Fri, Dec 10, 2010 at 2:42 PM, Matthew Weier O'Phinney < weierophin...@php.net> wrote: > On 2010-12-10, Nathan Nobbe wrote: > > --0016e6d7e101e083a4049714bad3 > > Content-Type: text/plain; charset=UTF-8 > > > > On Fri, Dec 10, 2010 at 12:55 PM, Matthew Weier O'Phinney < > > weierophin...@php.ne

Re: [PHP-DEV] Traits expecting interfaces implicitly leads to expensive runtime checks

2010-12-10 Thread Chad Fulton
On Fri, Dec 10, 2010 at 1:00 PM, Nathan Nobbe wrote: >> >> As a note, I'm not strongly opposed to this proposal, since I don't >> think it would do any harm. It just seems to me like a "kitchen sink" >> feature. >> >> The issue for me is that traits, as I understand them, are there >> primarily fo

Re: [PHP-DEV] Traits expecting interfaces implicitly leads to expensive runtime checks

2010-12-10 Thread Matthew Weier O'Phinney
On 2010-12-10, Nathan Nobbe wrote: > --0016e6d7e101e083a4049714bad3 > Content-Type: text/plain; charset=UTF-8 > > On Fri, Dec 10, 2010 at 12:55 PM, Matthew Weier O'Phinney < > weierophin...@php.net> wrote: > >> On 2010-12-10, Nathan Nobbe wrote: >> > --0016e6dbe7fb8861a1049712ad63 >> > Content-Ty

Re: [PHP-DEV] Traits expecting interfaces implicitly leads to expensive runtime checks

2010-12-10 Thread Nathan Nobbe
On Fri, Dec 10, 2010 at 12:39 PM, Chad Fulton wrote: > On Fri, Dec 10, 2010 at 10:39 AM, Nathan Nobbe > wrote: > > On Fri, Dec 10, 2010 at 11:04 AM, Chad Fulton > wrote: > >> > >> On Fri, Dec 10, 2010 at 9:29 AM, Nathan Nobbe > >> wrote: > >> > On Fri, Dec 10, 2010 at 10:15 AM, Martin Wernstah

Re: [PHP-DEV] Traits expecting interfaces implicitly leads to expensive runtime checks

2010-12-10 Thread Nathan Nobbe
On Fri, Dec 10, 2010 at 12:55 PM, Matthew Weier O'Phinney < weierophin...@php.net> wrote: > On 2010-12-10, Nathan Nobbe wrote: > > --0016e6dbe7fb8861a1049712ad63 > > Content-Type: text/plain; charset=UTF-8 > > > > On Fri, Dec 10, 2010 at 11:04 AM, Chad Fulton > wrote: > > > > > On Fri, Dec 10, 2

Re: [PHP-DEV] Traits expecting interfaces implicitly leads to expensive runtime checks

2010-12-10 Thread Matthew Weier O'Phinney
On 2010-12-10, Nathan Nobbe wrote: > --0016e6dbe7fb8861a1049712ad63 > Content-Type: text/plain; charset=UTF-8 > > On Fri, Dec 10, 2010 at 11:04 AM, Chad Fulton wrote: > > > On Fri, Dec 10, 2010 at 9:29 AM, Nathan Nobbe > > wrote: > > > On Fri, Dec 10, 2010 at 10:15 AM, Martin Wernstahl > > wrot

Re: [PHP-DEV] Traits expecting interfaces implicitly leads to expensive runtime checks

2010-12-10 Thread Chad Fulton
On Fri, Dec 10, 2010 at 10:39 AM, Nathan Nobbe wrote: > On Fri, Dec 10, 2010 at 11:04 AM, Chad Fulton wrote: >> >> On Fri, Dec 10, 2010 at 9:29 AM, Nathan Nobbe >> wrote: >> > On Fri, Dec 10, 2010 at 10:15 AM, Martin Wernstahl >> > wrote: >> > >> >> First i have to say that I am not a PHP inter

Re: [PHP-DEV] Traits expecting interfaces implicitly leads to expensive runtime checks

2010-12-10 Thread Nathan Nobbe
On Fri, Dec 10, 2010 at 11:04 AM, Chad Fulton wrote: > On Fri, Dec 10, 2010 at 9:29 AM, Nathan Nobbe > wrote: > > On Fri, Dec 10, 2010 at 10:15 AM, Martin Wernstahl > wrote: > > > >> First i have to say that I am not a PHP internals developer, but as a > user > >> I think it would maybe be bett

Re: [PHP-DEV] Traits expecting interfaces implicitly leads to expensive runtime checks

2010-12-10 Thread Chad Fulton
On Fri, Dec 10, 2010 at 9:29 AM, Nathan Nobbe wrote: > On Fri, Dec 10, 2010 at 10:15 AM, Martin Wernstahl wrote: > >> First i have to say that I am not a PHP internals developer, but as a user >> I think it would maybe be better to just let the trait use the implements >> keyword, and "copy" that

Re: [PHP-DEV] Traits expecting interfaces implicitly leads to expensive runtime checks

2010-12-10 Thread Martin Wernstahl
Oh, sorry, should have read the RFC thoroughly before sending an email. But yeah, require might be a good choice, provided it doesn't collide with the specific require logic in the scanner/parser (I don't have much knowledge on that subject, but I've peeked a few times on it as it is interesting).

Re: [PHP-DEV] Traits expecting interfaces implicitly leads to expensive runtime checks

2010-12-10 Thread Nathan Nobbe
On Fri, Dec 10, 2010 at 10:15 AM, Martin Wernstahl wrote: > First i have to say that I am not a PHP internals developer, but as a user > I think it would maybe be better to just let the trait use the implements > keyword, and "copy" that to the classes utilizing the trait? > This is actually in

Re: [PHP-DEV] Traits expecting interfaces implicitly leads to expensive runtime checks

2010-12-10 Thread Stefan Marr
Hello Martin: On 10 Dec 2010, at 18:15, Martin Wernstahl wrote: > First i have to say that I am not a PHP internals developer, but as a user I > think it would maybe be better to just let the trait use the implements > keyword, and "copy" that to the classes utilizing the trait? > Or does that se

Re: [PHP-DEV] Traits expecting interfaces implicitly leads to expensive runtime checks

2010-12-10 Thread Martin Wernstahl
First i have to say that I am not a PHP internals developer, but as a user I think it would maybe be better to just let the trait use the implements keyword, and "copy" that to the classes utilizing the trait? Or does that seem illogical when the trait does not implement all of the methods specifie

Re: [PHP-DEV] Traits expecting interfaces implicitly leads to expensive runtime checks

2010-12-10 Thread Stefan Marr
Hi Nathan: On 10 Dec 2010, at 17:49, Nathan Nobbe wrote: > Def not :D, however, I still think this paradigm is lacking. Don't you think > it makes more sense if I write a trait that expects a given interface or > class to be able to specify said interface/class in it's entirety with just a > s

Re: [PHP-DEV] Traits expecting interfaces implicitly leads to expensive runtime checks

2010-12-10 Thread Nathan Nobbe
On Thu, Dec 9, 2010 at 4:04 PM, Stefan Marr wrote: > Hi Nathan: > > > On 09 Dec 2010, at 23:42, Nathan Nobbe wrote: > > What I'm getting at is the scenario when a trait is designed to be used > in > > concert with the class in which it is being used. In this case the trait > > expects certain fu