> > In this case I would suggest to use class A<T <: T1> which leaves room
> > open to define lower bounds later on
>
> IMHO that is bordering on unreadable - all those brackets are really
> confusing and hard on the eyes.
>
I agree, it looks quite ugly :-)
Therefore another suggestion:
class A<T1, T2> [Foo <: T1, T2 <: Bar] {
//....
}
> Either way, using : does not prevent us from adding lower bounds later on -
> but even then, upper bound is the 99% use
> case, so I don't think it makes sense to design the syntax around a possible
> future upper bound.
>
> If we do support it in the future, I don't think anyone's going to care what
> it looks like, as it's unlikely most people will ever
> encounter it or need it.
>
You're probably right. I use wildcard types with lower bounds in Java from time
to time but rather rarely.
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php