Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:75420 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 70106 invoked from network); 13 Jul 2014 15:43:54 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 13 Jul 2014 15:43:54 -0000 Authentication-Results: pb1.pair.com smtp.mail=ajf@ajf.me; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=ajf@ajf.me; sender-id=pass Received-SPF: pass (pb1.pair.com: domain ajf.me designates 192.64.116.216 as permitted sender) X-PHP-List-Original-Sender: ajf@ajf.me X-Host-Fingerprint: 192.64.116.216 imap10-3.ox.privateemail.com Received: from [192.64.116.216] ([192.64.116.216:44586] helo=imap10-3.ox.privateemail.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 90/CA-16748-939A2C35 for ; Sun, 13 Jul 2014 11:43:54 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.privateemail.com (Postfix) with ESMTP id 0428B2400C6; Sun, 13 Jul 2014 11:43:51 -0400 (EDT) X-Virus-Scanned: Debian amavisd-new at imap10.ox.privateemail.com Received: from mail.privateemail.com ([127.0.0.1]) by localhost (imap10.ox.privateemail.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id IQ3kvaMkeZtc; Sun, 13 Jul 2014 11:43:50 -0400 (EDT) Received: from [192.168.0.15] (unknown [90.210.122.167]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.privateemail.com (Postfix) with ESMTPSA id 119932400C2; Sun, 13 Jul 2014 11:43:49 -0400 (EDT) Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) In-Reply-To: <9BEF5424-129A-4311-93FF-913837B4157C@rouvenwessling.de> Date: Sun, 13 Jul 2014 16:43:46 +0100 Cc: PHP internals Content-Transfer-Encoding: quoted-printable Message-ID: <54D11CA7-BC81-4E2F-957C-F9FBFFFF775A@ajf.me> References: <08503591-EFC8-48E6-984E-FFC292C5EA5F@ajf.me> <9BEF5424-129A-4311-93FF-913837B4157C@rouvenwessling.de> To: =?windows-1252?Q?Rouven_We=DFling?= X-Mailer: Apple Mail (2.1878.6) Subject: Re: [PHP-DEV] [RFC] Scalar Type Hinting With Casts (re-opening) From: ajf@ajf.me (Andrea Faulds) On 13 Jul 2014, at 16:28, Rouven We=DFling wrote: > On 13 Jul 2014, at 17:05, Andrea Faulds wrote: >=20 >> On 13 Jul 2014, at 16:00, Rouven We=DFling = wrote: >>=20 >>> One thing however seems like a rather bad idea, and that is exposing = the type of resource in this way. Resources are not compatible between = each other, making such a hint not very useable. If people start adding = this hint to their methods it will also make it much harder to change = resources into objects (like it has been done for gmp and I have a pull = request for hash) >>=20 >> Those are good points. Is there any sane way to hint for them, then? >=20 > I don=92t think so. I suggest leaving them out for now. I hope we=92ll = see mores resources converted into classes but if that doesn=92t happen = hinting for resources can still be addressed later. I agree, and after asking Anthony about it, I=92ve removed the resource = type hint from the RFC and patch. Besides, it isn=92t really a scalar = type (in its semantics, at least) anyway, and there=92s no cast operator = for it. -- Andrea Faulds http://ajf.me/