Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:107329 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 99880 invoked from network); 26 Sep 2019 12:24:02 -0000 Received: from unknown (HELO php-smtp3.php.net) (208.43.231.12) by pb1.pair.com with SMTP; 26 Sep 2019 12:24:02 -0000 Received: from php-smtp3.php.net (localhost [127.0.0.1]) by php-smtp3.php.net (Postfix) with ESMTP id 648322D1FC8; Thu, 26 Sep 2019 03:03:21 -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.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H2, SPF_HELO_NONE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS8560 212.227.0.0/16 X-Spam-Virus: No Received: from mout.gmx.net (mout.gmx.net [212.227.17.22]) (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; Thu, 26 Sep 2019 03:03:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1569492198; bh=Mqqs7Di1cvhEAwjUVw7q1eoKOYBOaulTU0EmU+2d9II=; h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To; b=che2mVdZGAm8xd7jt6XXUXLP78QmYy42Sodu53lQZwTx+8nQlHYdBlKcbKeb75lMD gzdiegSHDsvd4xROP/n4RPIF+z5X+nfu8xh6+zAd9lSbIUadO1FfeckZZeFDM3mod8 em54ZpoddnhyI0KvaFiU4hVRoPdCrJ2hbv3jErgU= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [192.168.2.144] ([84.179.236.50]) by mail.gmx.com (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MMGNC-1iUXlD3Ues-00JGlB; Thu, 26 Sep 2019 12:03:17 +0200 To: Nikita Popov , Sara Golemon Cc: Claude Pache , Benjamin Morel , PHP internals References: <1544E25D-630F-4E02-BCF1-1A0DEF1EBD60@gmail.com> Message-ID: <74a6b1f0-87cf-a45d-c4a2-0b8ffcd56057@gmx.de> Date: Thu, 26 Sep 2019 12:03:18 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: de-DE Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:3U7Z21b9CNRKFia7JhClIonwrWGfZdvnrSQrHS9rQmzq52Cd8jr X4yJoGTWqoaXHOrMPM9McnuD0IDxS8/bAW7GfZ/jtW9lP9Xo8TDgi+u2vi0bmKfknXyHj8H vCCYhsEDX4WLYPZCkjNTd77h7nZ3pKqNqQQkO3GMQCjzG4WrjiBq+MJ6wjwqd56JcTddetl uVJi12PDXj7YF5IErQ+Lg== X-UI-Out-Filterresults: notjunk:1;V03:K0:w2GBFTLz6Pk=:OE4rjd2/RnIGSaxc2xiAyi pOdPK6r1qTgZKNQM3CM5OIU+3I7LoxWmbHNvJiwlrCzLreqHoB2TjftT8bwwGxFhdF1rb1+c/ 45PJdGohnO3jvq9SzwQPR1RYyl/ZlqRCmW1gZvONjg+8xjR0E5MNuSaCPuRh0KJ+qxm2ZFGvN erTD55eEG8T9ElQ2dJv0XgX5WoEepjaqDJN9OPgdm0WegdHulIfPnJ8b8mKcWugcAwmUERIrj cFm0dfFHhGHXandqXG+VAMB0cwKY5kbh8bjJFtQmMjn3eRdDVwVnp4MPdoEiwp59lCS7Z0oVc GKehXCibfzZrQWb6ZQTpvjYSd4xyVxaRHvOx/BmLHI+8LaR+z6jQ8Zg0rJLb23nsd7weRNUrr zpOmuKgD9eu3lEF0kuPf91WWRFZrOJNEx5SCxdpweKGz4Tb4VOtlXKOY6lm5M7h8N8RWWHu57 l2wRj98y4qGKOk1T49bDJqT//u32Sh8/tFgtjjUKFbaRg7KdrWt+AEyVOgveHYqOgFj4A/bOo ln78980u9BIO9qIX12nD4Go9aonUmxYu3WDj1Mb99TpW+6ZnmNxs7oDlL+S0ZDWH6JSrmM5Fe nfLl1Don5fkxlcQOPIaPSJL60xUU5yQWy3u/w/Et+Mu3H84imBTtaM0mFCuV2DhBiq3/DW5ed G9kbTzgvKHmYaEapSYg/2dyaQwD9uFU6PrKRwzTrPa7dUwR7d5ccVMO7VLcXKjXXl6HJnKqtI AhNLt3Sy62Z+blev2wQfAbIbhGA7TwsKAedPhdFnoDf1XJ7+pgmsIlgo+IZz/dFYl67xkGTLX jEKDd1C1HYunVf7SqNEGFe2/obxPoXAlIDkYKzV13ARhXmmH+sCdv903IjerhMwmkRMi65+Yw /zT8oqZ1Q2HkFbP1y6yikyxmsHq0g1dhwR54uAbvNIFgodapQwMPsQQchkgWEhBARDfi+FaWG YkKRahOR+RJJzdHS6cHglvYSqtMMg0XncHpaFLvd6808Rz3fYZTPLQVhk1PPuvdMdIF3eER4W ao43ART9qfx9huiYx0zTJ+JW05hImF1un26JE4lglOQp73x/U0b/pF2bOw06tBfefyY0RBVPF HkM8VtNe0H8Dd6LN3FF7XfVcusL5dcjnoGve5i2JTGGrfbln9DAg2BKgVePT7k/Lr6EVj7ADC UriPw3SqGMMCOc+V+BAaqVhpEwWczzpQMPJz0EmRB0SVXOnmiLrncFOZxIVxoCg8eUtuek8/M WT9xi1tlxXvjkKn71EbHBHYCAQYjJZD97wnwFcwAqo5FmPyrN41d1J+f6InI= X-Envelope-From: Subject: Re: [PHP-DEV] [RFC] Union Types v2 From: cmbecker69@gmx.de ("Christoph M. Becker") On 26.09.2019 at 10:06, Nikita Popov wrote: > This RFC is currently held up by a lack of implementation. Once that is > done, the RFC will go forward as-is (barring any novel concerns). Because I > consider it an important part of the overall proposal (*), I will neither > remove the false type, nor split it into a separate vote. People may vote > against the whole RFC if they disagree with this aspect, or any other > aspect of the proposal. > > (*) While certainly not the primary reason for why we should support union > types, the reason why I brought this proposal forward at this time > specifically, is that the lack of union types is a blocker for my pet > project of providing comprehensive type annotations for internal functions. > Supporting "false" is strictly necessary for this purpose, because it is > part of nearly all unions as far as internal functions are concerned. Maybe an option would be to introduce "falsable" types by marking them with an exclamation mark in front? While I'm generally not in favor of having failure signalled by returning false (except for bool functions), and it wouldn't solve the issue generally (some functions can return multiple types in addition to false), it appears to fit to be able to mark nullable types with a question mark. By the way, I wouldn't call that a "pet project". In my opinion, that is a really big improvement, and I hope that these stub files can become the single source of truth in the not too distant future. Regards, Christoph