Re: [RFC][Discuss] Covariant return- and contravariant parameter- types
| From: | Christoph M. Becker | Date: | Wed, 12 Dec 2018 11:25:40 +0000 |
| Subject: | Re: [RFC][Discuss] Covariant return- and contravariant parameter- types | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-103592@lists.php.net to get a copy of this message | ||
On 11.12.2018 at 21:34, Levi Morrison wrote:
> On Mon, Nov 26, 2018 at 2:25 PM Levi Morrison <levim@php.net> wrote:
>
>> I am happy to announce my latest RFC, [Covariant Returns and
>> Contravariant Parameters][1], is open for discussion. If you do not
>> recognize those terms then hopefully the introduction coupled with the
>> [examples][2] will help. […]
>>
>> [1]:
>> https://wiki.php.net/rfc/covariant-returns-and-contravariant-parameters
>> [2]:
>> https://wiki.php.net/rfc/covariant-returns-and-contravariant-parameters#examples
>
> It has been two weeks now. If you want to provide any feedback, or
> follow-up on anything from the discussion, please do so soon. I hope
> to put this to vote before the end of the year.
Thanks for working on this, Levi. Highly appreciated!
I may have missed this, but otherwise I'd be quite surprised that nobody
had commented on:
| Therefore, by-reference parameters are still contravariant, […]
Call-by-reference is not seldom used to provide out-parameters, but
these should not be contravariant according to LSP. Therefore, it might
be best to keep by-reference parameters invariant.
--
Christoph M. Becker