Re: [PHP-DEV] Re: [RFC] Traits with interfaces

2016-02-24 Thread Kevin Gessner
On Tue, Feb 23, 2016 at 4:48 AM, Chris Riley wrote: > This isn't such a great idea as it will cause some of traits functionality > to be broken: I can currently use a trait and alias its methods and change > their visibility. If a trait implements an interface which is copied onto > my class I ca

[PHP-DEV] Re: [RFC] Traits with interfaces

2016-02-22 Thread Kevin Gessner
On Thu, Feb 18, 2016 at 4:13 PM, Kevin Gessner wrote: > On Wed, Feb 17, 2016 at 2:05 PM, Kevin Gessner wrote: > >> I've created a proper RFC wiki page here with the draft: >> https://wiki.php.net/rfc/traits-with-interfaces >> >> It includes more detail and sev

Re: [PHP-DEV] [RFC] Traits with interfaces

2016-02-19 Thread Kevin Gessner
On Thu, Feb 18, 2016 at 2:16 PM, Chase Peeler wrote: > > > On Thu, Feb 18, 2016 at 1:29 PM Nikita Popov wrote: > >> HHVM already supports "trait Foo implements Iface" with the semantics that >> the interface is also implemented by the using class. >> >> Additionally HHVM supports a notion of "re

[PHP-DEV] Re: [RFC] Traits with interfaces

2016-02-18 Thread Kevin Gessner
On Wed, Feb 17, 2016 at 2:05 PM, Kevin Gessner wrote: > On Wed, Feb 17, 2016 at 9:25 AM, Kevin Gessner wrote: > >> Hello internals team! I'd like to propose an RFC to allow traits to >> implement interfaces. >> > > I've created a proper RFC wiki page her

Re: [PHP-DEV] [RFC] Traits with interfaces

2016-02-18 Thread Kevin Gessner
On Wed, Feb 17, 2016 at 6:13 PM, Levi Morrison wrote: > On Wed, Feb 17, 2016 at 12:48 PM, Kevin Gessner wrote: > > I don't think there is enough benefit from allowing traits to declare > > interfaces, but not propagating the interface out to classes that insert > the >

Re: [PHP-DEV] Re: [RFC] Traits with interfaces

2016-02-18 Thread Kevin Gessner
Hi Chase and Larry, On Thu, Feb 18, 2016 at 10:11 AM, Chase Peeler wrote: > On Thu, Feb 18, 2016 at 5:35 AM Larry Garfield > wrote: > I'd rather the class > > still need to self-declare the interface; that it uses a trait to > > fulfill that contract is irrelevant to the outside world. > > > I

Re: [PHP-DEV] [RFC] Traits with interfaces

2016-02-17 Thread Kevin Gessner
On Wed, Feb 17, 2016 at 1:17 PM, Fleshgrinder wrote: > I agree with the others having a class implementing the interface > automatically just because a trait implements it is not a good idea. > The class should always decide on its own if it wants to implement an > interface or not. > I'm not cl

Re: [PHP-DEV] [RFC] Traits with interfaces

2016-02-17 Thread Kevin Gessner
On Wed, Feb 17, 2016 at 10:26 AM, Levi Morrison wrote: > I want to add my personal experience with traits: every time I create > a trait it is to implement an interface. Here is a publicly available > [example with OuterIterator]( > https://github.com/morrisonlevi/Ardent/blob/master/src/Collectio

[PHP-DEV] Re: [RFC] Traits with interfaces

2016-02-17 Thread Kevin Gessner
On Wed, Feb 17, 2016 at 9:25 AM, Kevin Gessner wrote: > Hello internals team! I'd like to propose an RFC to allow traits to > implement interfaces. > I've created a proper RFC wiki page here with the draft: https://wiki.php.net/rfc/traits-with-interfaces It includes more

Re: [PHP-DEV] [RFC] Traits with interfaces

2016-02-17 Thread Kevin Gessner
On Wed, Feb 17, 2016 at 9:34 AM, Sebastian Bergmann wrote: > Am 17.02.2016 um 15:25 schrieb Kevin Gessner: > > Hello internals team! I'd like to propose an RFC to allow traits to > > implement interfaces. > > I think that would violate "The Flattening Property

[PHP-DEV] [RFC] Traits with interfaces

2016-02-17 Thread Kevin Gessner
ok forward to your thoughts and feedback. Thanks in advance -- Kevin Kevin Gessner Staff Software Engineer etsy.com