Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:80063 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 59579 invoked from network); 1 Jan 2015 17:09:26 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 1 Jan 2015 17:09:26 -0000 Authentication-Results: pb1.pair.com header.from=mails@thomasbley.de; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=mails@thomasbley.de; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain thomasbley.de from 85.13.137.24 cause and error) X-PHP-List-Original-Sender: mails@thomasbley.de X-Host-Fingerprint: 85.13.137.24 dd15934.kasserver.com Received: from [85.13.137.24] ([85.13.137.24:43317] helo=dd15934.kasserver.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 54/A0-60454-54F75A45 for ; Thu, 01 Jan 2015 12:09:25 -0500 Received: from dd15934.kasserver.com (dd0802.kasserver.com [85.13.143.1]) by dd15934.kasserver.com (Postfix) with ESMTPSA id 3DD0A2605AB; Thu, 1 Jan 2015 18:09:22 +0100 (CET) MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-SenderIP: 95.90.235.1 User-Agent: ALL-INKL Webmail 2.11 In-Reply-To: References: <41D5BB0B-73AF-488E-968D-90B2878E3178@ajf.me> <20150101164402.EB1442605AB@dd15934.kasserver.com> To: ocramius@gmail.com Cc: ajf@ajf.me, nikita.ppv@gmail.com, internals@lists.php.net Message-ID: <20150101170922.3DD0A2605AB@dd15934.kasserver.com> Date: Thu, 1 Jan 2015 18:09:22 +0100 (CET) Subject: Re: [PHP-DEV] [RFC] Scalar Type Hints From: mails@thomasbley.de ("Thomas Bley") > The problem is that the current proposed hints/casts are deviating from the > type-hints that we are used to I don't think type hints we currently have are different. The only difference we have is that there is no automatic casting for objects/arrays to scalars and scalars to objects/arrays (I exclude __toString() and $a=[]; echo $a;). Regards Thomas Marco Pivetta wrote on 01.01.2015 17:56: > On 1 January 2015 at 17:44, Thomas Bley wrote: > >> I think it is no problem to add strict parameter type hints with another >> rfc (if this rfc gets accepted), e.g. function foobar(string! $str, int! >> $str){} or any other syntax. >> > > The problem is that the current proposed hints/casts are deviating from the > type-hints that we are used to, therefore this particular feature should > (eventually) have an alternate syntax, whereas the strict hints would just > use `int`, `integer`, `string`, `float`, `bool`, `boolan` without > additional chars (assuming that we will get strict hints somewhen). > > This will also reduce clashes with the current HHVM implementation. > > Marco Pivetta > > http://twitter.com/Ocramius > > http://ocramius.github.com/ >