Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:80163 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 61380 invoked from network); 4 Jan 2015 23:58:40 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Jan 2015 23:58:40 -0000 Authentication-Results: pb1.pair.com smtp.mail=smalyshev@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=smalyshev@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.214.174 as permitted sender) X-PHP-List-Original-Sender: smalyshev@gmail.com X-Host-Fingerprint: 209.85.214.174 mail-ob0-f174.google.com Received: from [209.85.214.174] ([209.85.214.174:53853] helo=mail-ob0-f174.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A5/80-57266-FA3D9A45 for ; Sun, 04 Jan 2015 18:58:40 -0500 Received: by mail-ob0-f174.google.com with SMTP id nt9so65144488obb.5 for ; Sun, 04 Jan 2015 15:58:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=IyRX8iZf5v4T9pHEqFlG6Vai5WaI3DBl9UaHagTNyAI=; b=Hf6o6+TEHIlHpbVI7Qf6UDsYW/s4OADAiAA4ipde3snVoMTqtNtLaJluNq732ltLug /XF4Odge/0n+huBjR6cDSuI9qNZL94NQOJ9yBnNCJbIT98BskdVgMMxlmFPUleA5q4fv OIMS2pW4utRU9CLUMTDb2lYa0oIhfKCJ1pLttxvCxxeh2aDwCik6bbXHYKwTX8pPkk8a kYrDbfZxUIP3aqj0G1CjC75b/nereJmu0NJ5tDhw6MouJ4oRsFFJtVwDV7ho3q7vkRCK InX6xRL/EE8ei/mCjO54AcT78nTUZTdFKaJPTYlS0hakDyIJ34+Tha0pHr0dXDGI5qeT ZQNA== X-Received: by 10.182.19.167 with SMTP id g7mr45370276obe.75.1420415916785; Sun, 04 Jan 2015 15:58:36 -0800 (PST) Received: from Stas-Air.local (108-66-6-48.lightspeed.sntcca.sbcglobal.net. [108.66.6.48]) by mx.google.com with ESMTPSA id xs5sm835650obc.3.2015.01.04.15.58.35 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 04 Jan 2015 15:58:36 -0800 (PST) Message-ID: <54A9D39F.8010808@gmail.com> Date: Sun, 04 Jan 2015 15:58:23 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Derick Rethans CC: Andrea Faulds , PHP Internals References: <41D5BB0B-73AF-488E-968D-90B2878E3178@ajf.me> <54A466CB.9020400@gmail.com> In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [RFC] Scalar Type Hints From: smalyshev@gmail.com (Stanislav Malyshev) Hi! > That's in a namespace, so it's not actually Integer, but > Zend\Db\Metadata\Type\Integer Right, but it doesn't matter - in the same namespace (and in ones with suitable imports), foo(Integer $bar) still means the class, not the primitive type, and that would be broken by this RFC. Also, if integer becomes reserved word, you won't be able to write "class Integer" anymore, regardless of the namespace. > With namespaces (as in your above examples), this is already moot. I'm sorry, I don't see how this is moot if we still have the breakage as described above. > I think it's perfectly acceptable that PHP makes a built-in type a > reserved word. I would certainly not change it to PHPInt to "avoid any > obvious clashes". As I already pointed out, if we make it reserved word we'll have BC problem. We already had this experience when goto became reserved word - it resulted in a lot of breakage. This would be bigger, since we adding more reserved words and we know they are used in a lot of class names (and, possibly, method names too). -- Stas Malyshev smalyshev@gmail.com