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/

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to