Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:103511 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 36629 invoked from network); 27 Nov 2018 01:02:42 -0000 Received: from unknown (HELO mail-lj1-f170.google.com) (209.85.208.170) by pb1.pair.com with SMTP; 27 Nov 2018 01:02:42 -0000 Received: by mail-lj1-f170.google.com with SMTP id 83-v6so18038200ljf.10 for ; Mon, 26 Nov 2018 13:26:11 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=kK5AFrEV9qzM2aMf27OVxr8Elx2H7dLHCnOtzg0rpcg=; b=IjM7ramDnVqsOEXFSgzQIlyFAQ00P4c8Ozf4A2yLs40sd3mltqEUu7DS5vvxk1sA+C 4beTL2cxO74v/S+qYCy6n1G9IbDcK9EHVzfbZrD5i0rcgAAQHQ2ibQiQZ36T+ExOwk6l cfyB6Jce39BMgKziitcNG6NMjrQu8UQmjWLz/k9xu1Q/u6194Lh7JjAHKfbilEKbpAiL bdOdUvAMvOIhxx3Rq0QitENVs0JKfS625mVv5T7i/l/gRDjSxpF9+tbCarFlArj4CQul pPaE5EfZnnpJEh1vxytdkoHrbJTWt6r6oGEmZ57IUpV6CaKu5aGVS+vG9rVVIVdsxZRJ 2MrQ== X-Gm-Message-State: AA+aEWahz+8LVuCdWEvsiZoHrHbQjUdyjpteJllq2NSY7BXxzEkGjo1Z Xpu84y0QUmppQHtHxUX/UoFYi+mnYEdogHPJOKTEB7qN X-Google-Smtp-Source: AFSGD/U8VNiptFcncu3zVt+ynVKyEj3hv/8l3mszbjmtwYlnYDvv7rpm6t95R7kdNFv/qsF8Ss2LBf8X8mttnR4ejM8= X-Received: by 2002:a2e:2b11:: with SMTP id q17-v6mr17719831lje.25.1543267569649; Mon, 26 Nov 2018 13:26:09 -0800 (PST) MIME-Version: 1.0 Date: Mon, 26 Nov 2018 14:25:52 -0700 Message-ID: To: internals Content-Type: text/plain; charset="UTF-8" Subject: [RFC][Discuss] Covariant return- and contravariant parameter- types From: levim@php.net (Levi Morrison) 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. Here is one snippet that demonstrates covariant return types: Covariant return types and contravariant parameter types are highly requested features; here are a few of the bug reports: * https://bugs.php.net/bug.php?id=71825 * https://bugs.php.net/bug.php?id=72442 * https://bugs.php.net/bug.php?id=75385 * https://bugs.php.net/bug.php?id=75823 There is a [preliminary implementation][3] that is available. It will not be rebased during discussion to allow people to check out the code and get updates without worrying about it breaking. The code quality can definitely be improved, and there are still a few todo comments in the code. Please do not discuss the items found in [Future Scope][4] as part of this thread, which includes discussing types such as `mixed`, `scalar`, `numeric`, etc. I look forward to your feedback, and especially with your experimentation with the implementation. Levi Morrison [1]: https://wiki.php.net/rfc/covariant-returns-and-contravariant-parameters [2]: https://wiki.php.net/rfc/covariant-returns-and-contravariant-parameters#examples [3]: https://github.com/php/php-src/compare/master...morrisonlevi:variance2 [4]: https://wiki.php.net/rfc/covariant-returns-and-contravariant-parameters#future_scope