Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:75461 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 82044 invoked from network); 14 Jul 2014 13:44:38 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 14 Jul 2014 13:44:38 -0000 Authentication-Results: pb1.pair.com header.from=narf@devilix.net; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=narf@devilix.net; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain devilix.net designates 209.85.219.43 as permitted sender) X-PHP-List-Original-Sender: narf@devilix.net X-Host-Fingerprint: 209.85.219.43 mail-oa0-f43.google.com Received: from [209.85.219.43] ([209.85.219.43:54966] helo=mail-oa0-f43.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F2/D7-43645-5CED3C35 for ; Mon, 14 Jul 2014 09:44:37 -0400 Received: by mail-oa0-f43.google.com with SMTP id i7so3264764oag.16 for ; Mon, 14 Jul 2014 06:44:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=devilix.net; s=google; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=xzVxKoBYK76wON/6wh19XVOaEUX8D96lZ+X8/ZpBRz0=; b=rDk3qC2OVeiWKi/utoDgCaC0OQZLtzJRGcSIesSWxdQNZfxHTz73iIFmwBrlA0byxP aoFumzmcVUyzplVCrv5Y/I5ZvIZj3ma4rz++qzw/Y0furgLiEOUNXdWIVT9KoltLDQcu yvQu3gYZyuglah16RBvexcE8Vwt19UhzRZlk8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=xzVxKoBYK76wON/6wh19XVOaEUX8D96lZ+X8/ZpBRz0=; b=m4KFSkZQrufuJg425BOFEDA88yD6X6+scLtgO3vqQYYCyOCGpPSyjb3HSiSaL8hYyv LATyzLFXiDtVZalYftzSgGXrcBbcPL0n3B/7dQR4CgdEA1RPld+RLBD0BouL7EMdmq7o WzN0J7au8JJwa5MMtFVHoM4tOWUDNrpLf8b/SWwa2dVixwoLEZtSfrxiQaNy7vkzV04f eDCrcwmwY9a0kGi6TT+3+Oh59fC2ThEeKa5xgu+juba7Eo7DAOCUvCSoHenT9al2WILe YSIXYh8YhDdpcYwv5907G9vFN/h9+fJIjIFHw3GUpWx3zor7iHIpTlKL7Tv9Yo39RMkJ sxnA== X-Gm-Message-State: ALoCoQn7GOf+ZHg8r4Po7e1fZoDlRJPsu5ro7TPnyeLuvGc4pdoAIH8SlnAtBvzEoHCAN+JW1Skb MIME-Version: 1.0 X-Received: by 10.182.133.69 with SMTP id pa5mr18353027obb.2.1405345474054; Mon, 14 Jul 2014 06:44:34 -0700 (PDT) Received: by 10.202.75.205 with HTTP; Mon, 14 Jul 2014 06:44:33 -0700 (PDT) In-Reply-To: <53C3DADE.1040806@gmail.com> References: <08503591-EFC8-48E6-984E-FFC292C5EA5F@ajf.me> <16D48604-0C0A-4613-91A4-21392E3A2636@ajf.me> <53C3DADE.1040806@gmail.com> Date: Mon, 14 Jul 2014 16:44:33 +0300 Message-ID: To: Rowan Collins Cc: "internals@lists.php.net" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] [RFC] Scalar Type Hinting With Casts (re-opening) From: narf@devilix.net (Andrey Andreev) On Mon, Jul 14, 2014 at 4:27 PM, Rowan Collins wr= ote: > 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 sa= me >>> syntax for "strict parameter types" and "scalar parameter casts=E2=80= =9D. There=E2=80=99s >>> some truth there. >>> Let=E2=80=99s 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, tha= t > has been proposed already, and several people support it. > > It is not, however, what is currently proposed in this RFC, or what Andre= a > is asking in this post (which is a refinement of the RFC, not an alternat= ive > 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.) I've been following the thread so far. All I'm suggesting is to alter the proposed syntax, keeping the rest of the RFC the same. Cheers, Andrey.