Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:113718 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 96729 invoked from network); 23 Mar 2021 14:10:27 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 23 Mar 2021 14:10:27 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id ED5E3180506 for ; Tue, 23 Mar 2021 07:05:58 -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, 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-wr1-f49.google.com (mail-wr1-f49.google.com [209.85.221.49]) (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 ; Tue, 23 Mar 2021 07:05:55 -0700 (PDT) Received: by mail-wr1-f49.google.com with SMTP id j7so20921549wrd.1 for ; Tue, 23 Mar 2021 07:05:55 -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:content-transfer-encoding; bh=3xK45mgtq4QjLA2Wh3KyVliQa6zHoHVa6OqasmSNBVI=; b=nllo5mJb/VESx4mFcXE2DTtQAwb5k0HTieT6VauQRI0VykIzJKAwp0mGz9IB7zmI/C bMmsr5ThZj6PSNqWfOuvIfr/Wakej+l3DSegiXx3Db1PQNlG9rOHn9P2AB6eBTTNu/Vp rVT9ebhQvYaopyToGOdA1nPNRv3gGXWC+vzxPZrpY3LSp2BMzSab3ZLHQIN0R2hKbKHB 4F8jxDZEbuIWF4+QUa2UN2P666+2xXg53gcjXSMaVZdvsTLgW9G+UhaZhEWztImH/ZMp ul/l3aoTzEnmyX/iC87V/rZcjNFzimjBCdqpxZVbtQPmnE8sw2gX5oHnrnA5plIXBdj2 D2ig== 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:content-transfer-encoding; bh=3xK45mgtq4QjLA2Wh3KyVliQa6zHoHVa6OqasmSNBVI=; b=K80JpeCX3wV6/4AnzC2fbKlAknp9U9p/OEC6Tk0ukn22c3WzwhF0dCnCu6GEWl+lOm clzGfX3I9JL7ls0qDmA/et8HIfdp2XQZkkWZQ9DyYaGLXX5a6lMTQz34g06iafrqw0AB j4Xo68PSsf48SGX6SM3ORX5517bdPpuG87FlnTAnS9YYaM5vtIGytUmurLhuJodCil7G JRjSSw8Dp7p9PHkl9GUWsGkTn9QpDCiKp3xDg4IKJI7VcDNRvhk+9ISM/a0KMQdKuAAc miTqLlPIgZbp97hi93ORi5UHlWnJCqo+7efdCD3XYeBZU31zrzIUKscxIO9uTa8DQvBJ T/Gg== X-Gm-Message-State: AOAM5313QtzHgcWIqpij3SgDg9e4R91ZXulvUidDfoucQGQaQVQdwvLa fBhgLcFLBvWnS6EWB7bITLmOKopXbAhHWHNFl6EtRBzjkzKzgA== X-Google-Smtp-Source: ABdhPJzTjEDiTSNA62RKIh5a+Wolj9u9pHLxMaFWQq+4pSDeIAeGSKDz2dJxrkRhruMB6EYX2cm5X1zl9LFXZsoZR/c= X-Received: by 2002:a05:6000:1acd:: with SMTP id i13mr4197523wry.48.1616508353560; Tue, 23 Mar 2021 07:05:53 -0700 (PDT) MIME-Version: 1.0 References: <88f72c8f-3f4c-42d6-96aa-b8e9c9475a94@www.fastmail.com> In-Reply-To: <88f72c8f-3f4c-42d6-96aa-b8e9c9475a94@www.fastmail.com> Date: Tue, 23 Mar 2021 16:05:41 +0200 Message-ID: To: Larry Garfield Cc: php internals Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] [RFC] Pure intersection types From: someniatko@gmail.com (someniatko) > Should we be planning ahead for some future where union and intersection = types can be mixed and design the reflection API accordingly? I worry that= if we have a ReflectionIntersectionType, and a ReflectionUnionType, that R= eflectionIntersectionAndUnionType is just going to make both implementers a= nd users table-flip. As far as I understood, there is no need for any new "combination" `ReflectionType`-s. For e.g. "A|(B&C)". There should be a structure like this: ``` ReflectionUnionType#getTypes(): |-- ReflectionType |-- ReflectionIntersectionType#getTypes(): |-- ReflectionType |-- ReflectionType ```