Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:115599 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 44307 invoked from network); 28 Jul 2021 02:59:06 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 28 Jul 2021 02:59:06 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 54428180505 for ; Tue, 27 Jul 2021 20:26:15 -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_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from mail-ot1-f52.google.com (mail-ot1-f52.google.com [209.85.210.52]) (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, 27 Jul 2021 20:26:14 -0700 (PDT) Received: by mail-ot1-f52.google.com with SMTP id z6-20020a9d24860000b02904d14e47202cso731721ota.4 for ; Tue, 27 Jul 2021 20:26:14 -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=86JFuVImIo6YiB9uGO1gfW4QAalrkGFJyE7+uIOaD+U=; b=LScqazQxJ7fq9I2eImzqkVqku7iUFPkSCJ+HcsCnNUCY6VvYbMB/9VVbsfQN963U+Z OXmSB6Pyex6VjW5OFCwViXN3RgNy84tvl8YUbhwNW2e40W55Z32GJx+/hkCertrHEL6/ FbfHlxvMnJxaEg8GErbzCUiN227wX/YUY3ZWICg/ifCiZ7FuzErlh6CSqYfPEjD8wEE3 1ADINz5sdlrTPXUdUdcXZPA7jawC6J/cgtv7aQPQkxIxBdR5TH54WQt6j+eMJtB7Avk4 MTKC4OFqItZOzbD4zysw38r/Y0lU2scRTF4anySP3afeH9ZfyD7Fm1UZdh606s4V2cia xiOw== 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=86JFuVImIo6YiB9uGO1gfW4QAalrkGFJyE7+uIOaD+U=; b=YFvuL5hCD5K+x7awClWFtzwQq7tGWUHyu+IdksYd/sDLoasjT2QL0rSLhk/sy1YM02 VdPGd6hCt+ttSx6PfY5zjebBZg3trLW4V3rtfux1cXhfzVNtMCsekOLiUcvgT62nZzzi /tj/GCIoIT1IGrzen81HjMI8eMYUHkPnq7O77JIPR0axUvKyoqr/KZ8D0bbcPdwkCcV4 02rOU/LSvbEu0K2pBjtXXlsviIX6CLg9xj47wuTElKgaX45CJdG1kSpqaOKGAgIrsFR4 DajhtBr4HFfdM8kd6kSahbmoWnatX6P8YWgncFEIXLMEFAUuVqV913IthX6ssVQUHLJi wong== X-Gm-Message-State: AOAM531JB2BcN+amoYUbnkJmAjnHPdxuMmTYXTj39YMsDVo19ZdX7gyC nGBP/RknhPbIBplpJlYnc9NGbvOCbaDORaDFW30= X-Google-Smtp-Source: ABdhPJwSUYjh6B3k8SAzeztBZGaThKNUvtSZrGYI4XArwMzFBTH6q/noWBVeW15NDeZIAikLd5OrfBBgzT2Exwcszs8= X-Received: by 2002:a05:6830:18f7:: with SMTP id d23mr17360314otf.310.1627442772577; Tue, 27 Jul 2021 20:26:12 -0700 (PDT) MIME-Version: 1.0 References: <002e01d78326$27ed0680$77c71380$@webkr.de> In-Reply-To: Date: Wed, 28 Jul 2021 10:26:00 +0700 Message-ID: To: Jordan LeDoux Cc: Rowan Tommins , PHP internals Content-Type: multipart/alternative; boundary="0000000000005a111005c8268ca2" Subject: Re: [PHP-DEV] [RFC] Nullable intersection types From: pierre.php@gmail.com (Pierre Joye) --0000000000005a111005c8268ca2 Content-Type: text/plain; charset="UTF-8" Hi Jordan, On Wed, Jul 28, 2021, 10:02 AM Jordan LeDoux wrote: > Intersection types are very useful if you use composition over > inheritance. That is, in PHP, they are most useful when you are using > multiple interfaces and/or traits to represent different aspects of an > object which might be present. For example, using an actual library I > maintain, I have a concept of different number type objects. > Thanks for the detailed explanation. I do use them for very specific things (similar to your examples, for shapes). However my question was more about the rush for it, those are not easy to implement nicely, given the actual use cases, I am not sure it was worth this hurry. And I have the same feeling for this discussion about nullable intersection. best, Pierre > --0000000000005a111005c8268ca2--