Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:106844 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 52545 invoked from network); 4 Sep 2019 10:52:35 -0000 Received: from unknown (HELO mail-lj1-f173.google.com) (209.85.208.173) by pb1.pair.com with SMTP; 4 Sep 2019 10:52:35 -0000 Received: by mail-lj1-f173.google.com with SMTP id h3so11912343ljb.5 for ; Wed, 04 Sep 2019 01:26:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=CYM+/KcVzNlZMnOlFVb0jHntW3OyZJaBnC7rSL1g74Y=; b=e9YPmWeJ5GcMMXz2rwW00UUxsXWuAEyPzeYGUZq8SLag2i8/4i+EVVHCywawRQPOkf fZ2Roor60x86f5J2ix+rX1zHg6zy1qwAq4WjvFuQAL6/7lx7sSqfqG7hBxpnGzUbWpEm B3gBkLXLld0fwl13hsN34fZA7W0rpOjY6GXs2Jfc8VJo+8Xt8WXRX6xZmwrVqMn4tBGs wJga9nY3+vS5NKAIvbBprhccvImtEAFgeq8EAAxFDDf4BowLqsRYLjPiRXZBfRjVErUr Is3ob/IAK31S3V0GDU2w8VTzvM1j0Bo3tYO3koVHNrr2i8ALcLQEkCCj8QP1flMeFLoc 0png== 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=CYM+/KcVzNlZMnOlFVb0jHntW3OyZJaBnC7rSL1g74Y=; b=oH7Ix5lqXydDYMXggjGEknMkEYoSqn4Thu1+C4u1q+PGc06NAbvtFTKhfFtmNTqjNf 2Pa9mUDKnUYUekFDV9ZcGNSzH1XwEPJk8aAbWejYW9AC8mv1UwkSpqmsY5MEWV0+PBRz ts+Hzz/lidHibg05N6UQPuhpn/yaCrVPAgctT0fao+x6wQ06mqvH4IzO7A06rmxxb084 hWG5bKlrDLuXW08WAsNEle3y8kpNu/RMvOHTJvIeTK0Pf6C0uy6J2LfiumFsHx3rRftk XpT3BbEi2C4k2FdKuYpqCpQj3NZCQO5PbcNX40or8oraNxR2sJnim3q6LYa3taxS6yjK jhTA== X-Gm-Message-State: APjAAAUHslM63Qk9YSfP+PRbUqkrfIDJm45yV/06Kh8nhgMCdnEk7+8F Tfdd8fzv/qIFmDjYWECfnK8+Skf8WbsmJLdaCTOftiBr+g0= X-Google-Smtp-Source: APXvYqya5HMP5cq6avcj0zW1huQW5HuwNhET4BWtcY+sI6v6L9y/h7Hg3FFUIUaYQ00ft/pdLg13Yz5u3s3uHlb8WI8= X-Received: by 2002:a2e:81c3:: with SMTP id s3mr22357896ljg.70.1567585585791; Wed, 04 Sep 2019 01:26:25 -0700 (PDT) MIME-Version: 1.0 Date: Wed, 4 Sep 2019 10:26:09 +0200 Message-ID: To: PHP internals Content-Type: multipart/alternative; boundary="000000000000ff09270591b5f514" Subject: [RFC] Union Types v2 From: nikita.ppv@gmail.com (Nikita Popov) --000000000000ff09270591b5f514 Content-Type: text/plain; charset="UTF-8" Hi internals, I'd like to start the discussion on union types again, with a new proposal: Pull Request: https://github.com/php/php-rfcs/pull/1 Rendered Proposal: https://github.com/nikic/php-rfcs/blob/union-types/rfcs/0000-union-types-v2.md As an experiment, I'm submitting this RFC as a GitHub pull request, to evaluate whether this might be a better medium for RFC proposals in the future. It would be great if we could keep the discussion to the GitHub pull request for the purpose of this experiment (keep in mind that you can also create comments on specific lines in the proposal, not just the overall discussion thread!) Of course, you can also reply to this mail instead. The final vote will be held in the wiki as usual. Relatively to the previous proposal by Bob&Levi ( https://wiki.php.net/rfc/union_types), I think the main differences in this proposal are: * Updated to specify interaction with new language features, like full variance and property types. * Updated for the use of the ?Type syntax rather than the Type|null syntax. * Only supports "false" as a pseudo-type, not "true". * Slightly simplified semantics for the coercive typing mode. Regards, Nikita --000000000000ff09270591b5f514--