Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:84958 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 21080 invoked from network); 16 Mar 2015 00:16:47 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 Mar 2015 00:16:47 -0000 Authentication-Results: pb1.pair.com header.from=morrison.levi@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=morrison.levi@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.218.44 as permitted sender) X-PHP-List-Original-Sender: morrison.levi@gmail.com X-Host-Fingerprint: 209.85.218.44 mail-oi0-f44.google.com Received: from [209.85.218.44] ([209.85.218.44:36553] helo=mail-oi0-f44.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 51/E8-06614-DE026055 for ; Sun, 15 Mar 2015 19:16:46 -0500 Received: by oiaz123 with SMTP id z123so25082311oia.3 for ; Sun, 15 Mar 2015 17:16:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=PzAkLVxSn9WSDXjWM3d6J5bbp4j8S6K5k9wPf8Vk2YM=; b=b/+hQtyWRJ9gmH9uXYO6BEKH9+m/yHnfKFeQJgy5aoZPTTtRGqEh+YbGnaqlYP5+J6 Md3ufZBoFRTii6W0V+yt9vtjl/2H3aLdvjOGMt1/P104TnU15Dw1QRdDYXdVrZwOpq6x 1Bf6l5eNIrhO2Pagcm9Y2sZnqkb2r/s4W8sAS0GaYraMbE5k1/BAIr6w2P+Ja2l01hXH PS8y5EX1qfpfIQiNzImuCsA+xbkCTYGAgZFNuPgSMtrcYHOIm0Mr+YAJbC5gUCBWRs/0 j/AmPYo4ESTik3BSNyGPKdNrrgxWa3uAjJObNsbJ886foy2U8oK7cFOfg3fl0aY9QBO1 gIaQ== MIME-Version: 1.0 X-Received: by 10.182.251.138 with SMTP id zk10mr46122849obc.72.1426465003031; Sun, 15 Mar 2015 17:16:43 -0700 (PDT) Sender: morrison.levi@gmail.com Received: by 10.76.90.74 with HTTP; Sun, 15 Mar 2015 17:16:42 -0700 (PDT) In-Reply-To: <5504B69C.2070903@lerdorf.com> References: <5504B69C.2070903@lerdorf.com> Date: Sun, 15 Mar 2015 18:16:42 -0600 X-Google-Sender-Auth: nBSWO8lZ24VSQ0P6w3U3YigQNzE Message-ID: To: Rasmus Lerdorf Cc: Philip Sturgeon , Bob Weinand , =?UTF-8?Q?Pavel_Kou=C5=99il?= , internals Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] [RFC][PRE-VOTE] Reserving More Types in PHP 7 From: levim@php.net (Levi Morrison) On Sat, Mar 14, 2015 at 4:30 PM, Rasmus Lerdorf wrote: > On 03/15/2015 07:31 AM, Philip Sturgeon wrote: >> On Sat, Mar 14, 2015 at 7:38 AM, Bob Weinand wrote= : >>>> Am 14.03.2015 um 10:21 schrieb Pavel Kou=C5=99il : >>>> >>>> On Saturday, March 14, 2015, Levi Morrison wrote: >>>>> RFC Link: https://wiki.php.net/rfc/reserve_more_types_in_php_7 >>>>> >>>>> The proposal has changed from the original. It no longer reserves the >>>>> aliases out of the interest of reserving the smallest useful, >>>>> uncontroversial subset. Some people want to remove aliases for these >>>>> types so in the interest of being as uncontroversial as possible I am >>>>> no longer proposing to remove them. >>>>> >>>>> This will go into voting on March 15th unless something comes up >>>>> between now and then to persuade me otherwise. >>>>> >>>>> -- >>>>> PHP Internals - PHP Runtime Development Mailing List >>>>> To unsubscribe, visit: http://www.php.net/unsub.php >>>>> >>>>> >>>> >>>> Hello, >>>> >>>> why do you consider a "true" and "false" as a type? It's not a type. i= t's a >>>> value? >>>> >>>> Regards >>>> Pavel Kouril >>> >>> These aren't types. But useful for e.g. union types (int|false). [By th= e way they're internally handled as different types=E2=80=A6 but that's an = implementation detail=E2=80=A6] >>> >>> Also, he doesn't call them anywhere types, it's just the title. >>> >>> Bob >>> -- >>> PHP Internals - PHP Runtime Development Mailing List >>> To unsubscribe, visit: http://www.php.net/unsub.php >>> >> >> This is a solid plan. Vote this and everyone should +1 it, so if this >> scalar squabble results in a a 0-0-0 score we can at least add scalars >> later. > > This is not quite that obvious I don't think. If > https://wiki.php.net/rfc/context_sensitive_lexer isn't ready in time for > 7.0 and we don't need to reserve these for one of the STH RFCs then we > should hold off and do it alongside the context sensitive lexer change > or we are going to needlessly break a ton of code including Drupal8: > > > https://github.com/drupal/drupal/blob/8.0.x/core/lib/Drupal/Component/Uti= lity/String.php#L15 Rasmus (and others), How would you feel about emitting E_DEPRECATED whenever one of these[1] names is used for a class declaration? Emitting E_DEPRECATED is less helpful but less painful. It's not my preference (just like emitting E_DEPRECATED for PHP 4 constructors was not my preference) but ultimately I care about the eventual result. I'm happy to wait as long as we've agreed to fix it eventually. Of course, if a scalar types RFC passes most of these will be reserved anyway. Right now it is a coin toss if Anthony's proposal will pass (it keeps flipping back and forth). [1] int, float, bool, string, true, false, null