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> {}
2. It does not allow to require multiple types for T1:
"Currently, Hack only allows one constraint on a type or a method."
3. I found no example that Hack allows multiple type parameters like
class Foo<T1, T2> but also nothing that it is not possible
4. All type parameters must start with a capital T
5. Hack has generic methods
6. Hack has generic traits which we should also consider/specify how
they work exactly.
Greets
Dennis
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php