On Mon, Dec 18, 2017 at 11:52 AM, Andreas Hennings <andr...@dqxtech.net> wrote:
>> I believe your algorithm fails on this simple setup:
>
> Another comment I want to make here:
> The examples you give each have multiple class declarations per file.
> I would personally not care much, if these result in fatal error.
> All of this code used to be illegal until now (because no covariance
> support), so it would not be a BC problem if some of it continues to
> be illegal.

Just because it isn't a backwards compatibility break doesn't mean
it's a good way forward. Right now people have covariant returns -
they just don't express it in the signature because we don't allow it.
Wouldn't it seem odd that if the bodies of the methods stayed the same
and all they did was update the signature that it somehow breaks their
code?

I have some ideas about minimizing this impact but I really think we
ought to tackle covariant returns and contravariant parameters at the
same time. Any endeavor to add one should add the other to create a
cohesive design that works in both cases.

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

Reply via email to