Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:75453 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 66437 invoked from network); 14 Jul 2014 13:29:58 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 14 Jul 2014 13:29:58 -0000 Authentication-Results: pb1.pair.com header.from=rowan.collins@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=rowan.collins@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.212.180 as permitted sender) X-PHP-List-Original-Sender: rowan.collins@gmail.com X-Host-Fingerprint: 209.85.212.180 mail-wi0-f180.google.com Received: from [209.85.212.180] ([209.85.212.180:39656] helo=mail-wi0-f180.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 9F/24-43645-55BD3C35 for ; Mon, 14 Jul 2014 09:29:57 -0400 Received: by mail-wi0-f180.google.com with SMTP id n3so2541983wiv.1 for ; Mon, 14 Jul 2014 06:29:54 -0700 (PDT) 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:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=dOxm42oA71lAYF03DFVZaU5SyZofoYG04tODl5v+93c=; b=UnI4PH7Sj1HIl0SI1QnZs4xXqxOxAbLuLjGLASRO54mIKblyre1c2onKZyyK29T3Rg 95UdrBqPh65Ruoyh4DMlo/NnmQp7FJpbGPr/3XG2z+pAyWJZuCLPVN9pROhor+ocBtcs 4TOFRXeszPT6uxtiVMTpT8dr7DFpOQ7WE3AR2DU17j4ytVyW9yWV+HNvfWV6trrFOxvE /fi3oqs4ug74Lgi+6edAoR0b3kmQCeHsbN/zPaCt7Jsvoe2ZAKo2xAABXY1QXLZrQwQc zv/j0xp/R5Tr5WkZg2CgmPqgsrS6lS21oaqBsypWo1362cmIzj3jYv8G0F7iyXbJodZc Q3Cw== X-Received: by 10.180.211.71 with SMTP id na7mr24282179wic.55.1405344594821; Mon, 14 Jul 2014 06:29:54 -0700 (PDT) Received: from [192.168.0.139] ([62.189.198.114]) by mx.google.com with ESMTPSA id dn3sm31222335wib.12.2014.07.14.06.29.53 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 14 Jul 2014 06:29:54 -0700 (PDT) Message-ID: <53C3DADE.1040806@gmail.com> Date: Mon, 14 Jul 2014 14:27:58 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: internals@lists.php.net References: <08503591-EFC8-48E6-984E-FFC292C5EA5F@ajf.me> <16D48604-0C0A-4613-91A4-21392E3A2636@ajf.me> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: [PHP-DEV] [RFC] Scalar Type Hinting With Casts (re-opening) From: rowan.collins@gmail.com (Rowan Collins) Andrey Andreev wrote (on 14/07/2014): > Hi, > > On Mon, Jul 14, 2014 at 4:12 PM, Alexey Zakhlestin wrote: >> Some people talk about inconsistency, which is introduced by reusing same syntax for "strict parameter types" and "scalar parameter casts”. There’s some truth there. >> Let’s use different syntax. >> >> This might work: >> >> function foo((int) $a) >> { >> var_dump($a); >> } >> >> I would read it as declaration-level casting > I strongly support this. > > What we currently have with class/array typing is a different behavior > (regardless of the details behind it), and this syntax would make that > noticeable, which is a great thing. > > Cheers, > Andrey. > Please could you both read the existing messages in this thread. Yes, that has been proposed already, and several people support it. It is not, however, what is currently proposed in this RFC, or what Andrea is asking in this post (which is a refinement of the RFC, not an alternative to it). (Yes, I realise catching up with the whole thread might be hard work, I'm just worried we're going round in circles, as each new person to join the thread brings up all the same points that have been discussed already.) Regards, -- Rowan Collins [IMSoP]