Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:44881 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 7779 invoked from network); 9 Jul 2009 19:18:30 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 9 Jul 2009 19:18:30 -0000 Authentication-Results: pb1.pair.com header.from=greg@chiaraquartet.net; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=greg@chiaraquartet.net; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain chiaraquartet.net from 209.85.222.198 cause and error) X-PHP-List-Original-Sender: greg@chiaraquartet.net X-Host-Fingerprint: 209.85.222.198 mail-pz0-f198.google.com Received: from [209.85.222.198] ([209.85.222.198:56682] helo=mail-pz0-f198.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F7/B0-30297-582465A4 for ; Thu, 09 Jul 2009 15:18:30 -0400 Received: by pzk36 with SMTP id 36so323541pzk.29 for ; Thu, 09 Jul 2009 12:18:27 -0700 (PDT) Received: by 10.114.146.4 with SMTP id t4mr1723139wad.228.1247167106870; Thu, 09 Jul 2009 12:18:26 -0700 (PDT) Received: from monster.local ([76.84.30.125]) by mx.google.com with ESMTPS id f42sm1357061rvb.7.2009.07.09.12.18.25 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 09 Jul 2009 12:18:25 -0700 (PDT) Message-ID: <4A56427F.5080108@chiaraquartet.net> Date: Thu, 09 Jul 2009 14:18:23 -0500 User-Agent: Thunderbird 2.0.0.6 (Macintosh/20070807) MIME-Version: 1.0 To: Stanislav Malyshev CC: PHP Developers Mailing List References: <4A5606C8.2040800@chiaraquartet.net> <4A5641D2.1070308@zend.com> In-Reply-To: <4A5641D2.1070308@zend.com> X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] technical issues in type hinting patch are not as big of an issue as it appears From: greg@chiaraquartet.net (Greg Beaver) Stanislav Malyshev wrote: > Hi! > >> 2) use cast syntax >> >> function (int $integerObject) {} >> function ((int) $actualInteger) {} >> >> The tradeoff here is an intellectual one: (int) means something >> different in a method signature than what it means in regular PHP code. > > Actually, it means pretty much the same - conversion to int type. Hi, You assume that cast type hinting will be the implementation chosen. If the type hinting is in fact validation the way object type hinting is (strict type hinting), no conversion takes place, and the meaning is different. I should have said "if strict type hinting is implemented" in the drawback description to make that clear. Greg