Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:115516 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 369 invoked from network); 20 Jul 2021 09:18:46 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 20 Jul 2021 09:18:46 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 7676B1804E2 for ; Tue, 20 Jul 2021 02:43: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=-0.2 required=5.0 tests=BAYES_20,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,HTML_MESSAGE,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from mail-io1-f52.google.com (mail-io1-f52.google.com [209.85.166.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, 20 Jul 2021 02:43:57 -0700 (PDT) Received: by mail-io1-f52.google.com with SMTP id k11so23284760ioa.5 for ; Tue, 20 Jul 2021 02:43:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mirtes.cz; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=QzDXNiHWEX/CyNlSsIfxJw2mQjoZLjdtiotGrRUBdWU=; b=aXRkGhOsjKeP1/QwLVbhEBZnL80jC6Z67I6YTf1khQFtGsDZO7B5VMIMLEbwSdrHTX CxR4gZUolz+87m9RkqleQh7+3UQ6ZvnAZcQIHcuyzxIZAeCsXweqbp8nXOcHCNMB55qq 2KSF8qlvzOHmXx1B3q08Pwfm990bhZiXH8yds= 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; bh=QzDXNiHWEX/CyNlSsIfxJw2mQjoZLjdtiotGrRUBdWU=; b=LXw3PhCaPc2+n5y2nBbrEk60IalxrlCMT2NfJ8NFjxLozI5aJnvyGEnrRbhp9Ub7y8 P3F95fr945dMdBTahOwVNb/uLyb2BJx7LoppiIQWFSfuJ5/YKOwgx/n9CC4L8SIg88SA xk1BgaLSK8C/TC/Kt2CMJq7p9DsH1HTEstkPp/5W4927XsAqCWBaTECdywOeLA3kXt/q IWQ5IfM7mZ4xvzJTnbOqf9ARW8pRSLEb99zzPYOAxVHC6ziNekXdJz9254MG4/7oiirD YHLROyiqLuI7BHHJ7ayQDM/h2tz654q506wlsXSyuKCDsPkkD40Zubm8XsnLs+sIGg1N 1Gtg== X-Gm-Message-State: AOAM531af2iBnEHgPvAuaU8I/eKMx7Knn16aAaRbaS27B3hWiTKcAzBK AOf4YzvV5CuHVjTO+au3nSMTEtepX5scsbvS3RiPfGRvWAjlYA== X-Google-Smtp-Source: ABdhPJxHuTtsHdgnq1Q0B2R+LyC2VP2l9yYvLHgknC3BkNNp6hOrectXocfLZakgd3J+M5G7b0lIvCiZ+rc+UEYVrQA= X-Received: by 2002:a05:6602:59d:: with SMTP id v29mr11582959iox.132.1626774232237; Tue, 20 Jul 2021 02:43:52 -0700 (PDT) Received: from 1064022179695 named unknown by gmailapi.google.com with HTTPREST; Tue, 20 Jul 2021 05:43:51 -0400 Received: from 1064022179695 named unknown by gmailapi.google.com with HTTPREST; Tue, 20 Jul 2021 05:43:50 -0400 Mime-Version: 1.0 (Mimestream 0.23.1) References: In-Reply-To: Date: Tue, 20 Jul 2021 05:43:51 -0400 Message-ID: To: PHP Internals List Content-Type: multipart/alternative; boundary="0000000000003e21f505c78ae435" Subject: Re: [PHP-DEV] intersection types and null for defaults, properties and return types From: ondrej@mirtes.cz (=?UTF-8?Q?Ond=C5=99ej_Mirtes?=) --0000000000003e21f505c78ae435 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable I agree completely with George P. Banyard, these changes don=E2=80=99t seem= very well though-out. Pure intersection types are fine as accepted by the RFC. Both ?A&B and (A&B)|null are confusing and would create holes in the type system yet to be filled (but users would definitely try to use them which would only lead to confusion and disappointment). Ond=C5=99ej Mirtes --0000000000003e21f505c78ae435--