Re: Generic classes and methods RFC

From: Date: Sat, 12 Sep 2015 15:00:18 +0000
Subject: Re: Generic classes and methods RFC
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-88165@lists.php.net to get a copy of this message
Hi Dennis, Dennis Birkholz wrote:
Am 12.09.2015 um 12:03 schrieb Dennis Birkholz:
Hi together, 1. If we require some keyword instead of the colon to limit which types the type placeholders can have I would choose: class Foo<T1 instanceof Bla, T2 instanceof Blubb> {}
Just to save you some lookups in the Hack documentation: 1. Hack uses the "as" keyword: class Foo<T1 as Bla> {}
This seems like a poor syntax choice to me. Usually the word 'as' is used for aliases and such. If you hadn't told me its function here, I would probably have been very confused. 'T1' isn't an alias of Bla, right? It's some subclass. Thanks. -- Andrea Faulds http://ajf.me/

« previous php.internals (#88165) next »