Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:107323 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 60271 invoked from network); 26 Sep 2019 10:03:36 -0000 Received: from unknown (HELO php-smtp3.php.net) (208.43.231.12) by pb1.pair.com with SMTP; 26 Sep 2019 10:03:36 -0000 Received: from php-smtp3.php.net (localhost [127.0.0.1]) by php-smtp3.php.net (Postfix) with ESMTP id E3C3C2D1FF7 for ; Thu, 26 Sep 2019 00:42:56 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp3.php.net X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS3215 2.6.0.0/16 X-Spam-Virus: No Received: from mail-io1-xd29.google.com (mail-io1-xd29.google.com [IPv6:2607:f8b0:4864:20::d29]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by php-smtp3.php.net (Postfix) with ESMTPS for ; Thu, 26 Sep 2019 00:42:56 -0700 (PDT) Received: by mail-io1-xd29.google.com with SMTP id b136so4039985iof.3 for ; Thu, 26 Sep 2019 00:42:56 -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=mfGIu2wQtp+gdDhYKKVHWcPta1AzPCTvLWsmMtgZ9aI=; b=b2/hONVcKS0yCv6qkGoWn6En5KGEVeDkwo250SX84/9yw64deCwQinB7AgjmtS9LMa kPJSrxvRNu6/Hvpbn8ryFjevfAs4TSIzc4ooYecwcv3XwhP99L2NGVn42QLdXYEhHRnf rQeW2ujUJ2zhdTlJDdqYFrlahWmFdQAdgV6lr+w/GD0QSG3ZR2Kj05yBC+EM7C0lvMfG yiunQIZziWm/I7p0JnP4lAyG75q2uBTltffMQDrPeww3dIht+NKXDX69qhXb645aL5+c NynPWuVrerem7wRBYFueJ738lAcfj+9KyQEUNExko6tEQfbMCmEqwQEtVdcC3YyOIlkr LTnQ== 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=mfGIu2wQtp+gdDhYKKVHWcPta1AzPCTvLWsmMtgZ9aI=; b=t+RCXjVtzHDI5i2NRpRKpoTvldpIUOVWgsrT4drNik3zv5xBjGfoVyPIiPtcYOTZU0 OPfdkhEXbJWJCpdCH375TJ9Vy8ogQeseAC2+/fMhwycyyPJiFohLLRttCudcl9dby/+m g8CBPWZmNBy3vwgsWyn3YmyFD/C79h65ysdDBd79xVJvl1SuD8oYY/EwplAl9yq+TRNF d2tKqbvL9CwZaVxe8Xvk1lhax1UuiCbyuRw4a2Ss3MuD0UWuczRVHxMi6gRWZ3d+Uuru UBcWDpSJqq1YYYCf8Ic4bQIDKL2I8fMK9ZQsPOmL7qH+VI+RNLNp2uWlpQ/CZNewr1g0 9Raw== X-Gm-Message-State: APjAAAU6CRhzC3qc8YQFaFv3rtRwqznv+J+wlzVNKmV5pfd9N97Htkit 18QJXRLPJF60Ax9fV5tYbqpcEBh2QhJzkmijWUciZnazoA8= X-Google-Smtp-Source: APXvYqx9JdT7IFoAshhu6yYJb3DbQQ4016VXzSM8xCZo/xITA2RBwuJ6ByZpapeD6/cDzrC/9QdAS+j91dgMpvPgDY8= X-Received: by 2002:a02:3094:: with SMTP id q142mr2341413jaq.135.1569483775308; Thu, 26 Sep 2019 00:42:55 -0700 (PDT) MIME-Version: 1.0 References: <1544E25D-630F-4E02-BCF1-1A0DEF1EBD60@gmail.com> In-Reply-To: Date: Thu, 26 Sep 2019 09:42:42 +0200 Message-ID: To: Larry Garfield Cc: php internals Content-Type: multipart/alternative; boundary="000000000000e8768a05936fea0a" X-Envelope-From: Subject: Re: [PHP-DEV] [RFC] Union Types v2 From: benjamin.morel@gmail.com (Benjamin Morel) --000000000000e8768a05936fea0a Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable > I would tend to agree with Sara. That seems to be the only issue of contention and it is (AFAIK) reasonably straightforward to add "later" without blocking the rest of Union types. It would mean some functions wouldn't be able to get a fully accurate return type yet but... they've survived this long without them, they can wait a bit longer while this gets settled and/or some even more robust alternative is found. Note that I'm personally alright with only bool as a type (i.e. strpos() : int|bool). I was just pointing out that introducing false alone is adding yet another inconsistency to the language, and it may not need this right now. If everything is to be voted at once, I'd suggest a split vote as follows: - vote 1: introduce union types (base proposal with bool only) : yes / no - vote 2: add false/true types: false only / false and true / no =E2=80=94 Benjamin --000000000000e8768a05936fea0a--