Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:83315 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 33992 invoked from network); 20 Feb 2015 16:00:27 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 20 Feb 2015 16:00:27 -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.214.182 as permitted sender) X-PHP-List-Original-Sender: morrison.levi@gmail.com X-Host-Fingerprint: 209.85.214.182 mail-ob0-f182.google.com Received: from [209.85.214.182] ([209.85.214.182:35032] helo=mail-ob0-f182.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 99/03-14173-91A57E45 for ; Fri, 20 Feb 2015 11:00:26 -0500 Received: by mail-ob0-f182.google.com with SMTP id nt9so24367472obb.13 for ; Fri, 20 Feb 2015 08:00:22 -0800 (PST) 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=yOxA5grdbBSfLmf8Vh8C3KpPkRDQgPNFGz0ko/21zJ8=; b=x8Os/mkVYkUqXPw2j4MPQDs+UkUWzXSj8pLUnE2IyBUTW7lmVCbY3oToRT5TJJZ5yf cB6PJD7Zckp02WRwdRzbr6gF7bHfUdVQm715VNN+xLpX6CaUGY0UCircNoEMVPE4Y92Q WcUN1qZcafVfiV9sQPdEYBiFfeLfDJERImLgXGVKaQOq6WkZWHNqCLXBwGD5LtcU2ySK thXmDb9FRMJkOLVHdG1PA/lYNzOabsJ1BoLVc4brV0gYDCZwc9QFkQYQLGWZtXyWV/Mm oNIVHU29Q9mBLUCb2WVn/zWB5xCnKsMy9QE7ub0vmjmtziSuIcS2/2krT3cWiwTvWHm1 40wA== MIME-Version: 1.0 X-Received: by 10.60.114.40 with SMTP id jd8mr7118658oeb.12.1424448021905; Fri, 20 Feb 2015 08:00:21 -0800 (PST) Sender: morrison.levi@gmail.com Received: by 10.76.90.74 with HTTP; Fri, 20 Feb 2015 08:00:21 -0800 (PST) In-Reply-To: References: <04db01d04cc1$d9925770$8cb70650$@php.net> Date: Fri, 20 Feb 2015 09:00:21 -0700 X-Google-Sender-Auth: DWEL4HAn43SK1uyAv46tQHiSJ9E Message-ID: To: Andrey Andreev Cc: francois@php.net, internals Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] Re: [RFC] Reserving More Types in PHP 7 From: levim@php.net (Levi Morrison) On Fri, Feb 20, 2015 at 4:21 AM, Andrey Andreev wrote: > On Fri, Feb 20, 2015 at 6:01 AM, Fran=C3=A7ois Laupretre wrote: >> Add 'resource', 'object', 'scalar', 'mixed', 'numeric' If someone wants to reserve these I will leave them up to another RFC, as I suspect they are more controversial than what I have proposed. >> Remove 'double' (avoid this alias if we decide to encourage 'float' ever= ywhere) >> >> Not sure we'll use Boolean and integer but reserve also. >> >> Hope 'null', 'true', and 'false' can technically be used as type hints. = If not, bad news, especially for null. Love 'int|false' as return type ! This is out of scope for this RFC, but if this RFC passes they would be reserved which means this *could* be done without BC breaks in the future. > I'd rather not reserve 'resource'. Such a hint may be useful in the > short term, but there already are plans to turn the current resources > into objects, and with the rise of REST lately it is also an obvious > base class/interface/trait name. > > Agree on 'double' though ... if we want to discourage its usage, we > might even think of deprecating it. While deprecating it might be a good course of action, it is out of scope of this RFC. I personally think that reserving it is a good way to discourage its use: simply reserve it and then don't use it for anything. If we decide not to use the aliases if we have scalar types and the aliases are reserved this would prevent users from making custom types from the aliases. In my opinion this a Good Thing.