Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:114498 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 93171 invoked from network); 17 May 2021 14:32:54 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 17 May 2021 14:32:54 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 98CB718053A for ; Mon, 17 May 2021 07:42:12 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from mail-ed1-f54.google.com (mail-ed1-f54.google.com [209.85.208.54]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Mon, 17 May 2021 07:42:12 -0700 (PDT) Received: by mail-ed1-f54.google.com with SMTP id s6so7192621edu.10 for ; Mon, 17 May 2021 07:42:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=zX2s2AovJPGjmBHA5qIWGS5Qth0FEWCuBj6NMV2j7M0=; b=oEf7YT5KoctHDG0UCm0ipS7abIn/sXFKNfZPPoN0ME8pcgmDY2pGTfMGnxeRHRqHk6 J82AaceYzEnFmD/KfOk1+IFUk90Id235qXLTfL/vmfVBf8Ptl/GkFR+/A/8H+3dTQrMi JmcPaYYKqOdmr5vRqA2HjuIprlPcfbSIg4mNJ/Uxa4c1QeT/whNAMmWamJbWZ2Oerqw8 VgJ1Decbtz5kQU/W21Xx0hJRy6d2iqafAYWPorZZGceZYsKqNMKNd/wqvAAWWi/PFUDH O2PPQFfZf7/xgjTiPbjFeHpod6Os95iry88znNPz7itM5bca2+qBSO/DOHXWEv3bDl5k Auag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=zX2s2AovJPGjmBHA5qIWGS5Qth0FEWCuBj6NMV2j7M0=; b=MnmwWLI4hZS5qjKH8jHl8gQzfuYrSPSiRr0o7xqzrHdFiIrBKYtKZ3Gol86VT4dKmS /3A4UxlnZ92c88gPdeg9dijMTbLmoj0ChN4IUPfLrgikEdvduTp7tt/iiHW3H7vsZ6NS UVsFd4wk3ak027J5LEpngB4oSuYIfpTQXUccX52nMuOXeIKVzAAGNQTJavCOy6PHr2yS YseDJUDDZCRA5fSNbJ9SbwZ0TQdfhqLTFSWNMYLffpgW3D/8dyLj4TdT/2p+gS9jtH7n sjC0POiABsnlC3j79htorYUFlX/Maf+pxxALxj8I+BQLrU5MXcHUAz6nEWAtI+a2chxP zFGA== X-Gm-Message-State: AOAM531FmFqw/BdNZKabvrxVKsY6Bdm2nlbaWuiNtfZ/VJgEeSR66ea/ e3zFG32q4bCMyIztOwNxK4Vj57Z11C0W9oKQeKRGaqor X-Google-Smtp-Source: ABdhPJyuWvKv76Xj/mSmA0OcZ7NGWd9kH1jXY5TZ2ZyE6neehLWziFBK7iAEO6mcluZk8qGRQwl6QYFeYc+p9nNarW4= X-Received: by 2002:a05:6402:cb8:: with SMTP id cn24mr375404edb.325.1621262530805; Mon, 17 May 2021 07:42:10 -0700 (PDT) MIME-Version: 1.0 References: <624d7ea6-f9e3-4f0a-baea-9da15a75fdb0@www.fastmail.com> In-Reply-To: <624d7ea6-f9e3-4f0a-baea-9da15a75fdb0@www.fastmail.com> Date: Mon, 17 May 2021 15:41:59 +0100 Message-ID: To: Larry Garfield Cc: php internals Content-Type: multipart/alternative; boundary="0000000000003c846205c287999e" Subject: Re: [PHP-DEV] [RFC] Pure intersection types From: george.banyard@gmail.com ("G. P. B.") --0000000000003c846205c287999e Content-Type: text/plain; charset="UTF-8" On Mon, 17 May 2021 at 15:17, Larry Garfield wrote: > On the reflection front, am I correct that we'd end up with: > > abstract ReflectionType > -- ReflectionNamedType (single type) > -- ReflectionUnionType (basically an array of named types) > -- ReflectionIntersectionType (basically an array of named types) > > Where ReflectionUnionType and ReflectionIntersectionType are basically the > same API to decompose further. And should combined intersection/union > types be added in the future, the impact would be that their getTypes() > methods would return an array of some combination of ReflectionTypes, > whereas right now you could rely on them being ReflectioNamedType. (But > that also means one could build ahead for that already with a little > recursion.) > > Am I following that correctly? > > --Larry Garfield > This is indeed correct. George P. Banyard --0000000000003c846205c287999e--