Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:48400 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 84191 invoked from network); 22 May 2010 23:08:13 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 22 May 2010 23:08:13 -0000 Authentication-Results: pb1.pair.com smtp.mail=ilia@prohost.org; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=ilia@prohost.org; sender-id=unknown Received-SPF: error (pb1.pair.com: domain prohost.org from 209.85.212.42 cause and error) X-PHP-List-Original-Sender: ilia@prohost.org X-Host-Fingerprint: 209.85.212.42 mail-vw0-f42.google.com Received: from [209.85.212.42] ([209.85.212.42:42188] helo=mail-vw0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 93/34-46027-CD368FB4 for ; Sat, 22 May 2010 19:08:13 -0400 Received: by vws15 with SMTP id 15so886888vws.29 for ; Sat, 22 May 2010 16:08:10 -0700 (PDT) MIME-Version: 1.0 Received: by 10.220.108.227 with SMTP id g35mr2345662vcp.127.1274569690227; Sat, 22 May 2010 16:08:10 -0700 (PDT) Received: by 10.220.70.148 with HTTP; Sat, 22 May 2010 16:08:10 -0700 (PDT) In-Reply-To: <698DE66518E7CA45812BD18E807866CE0427ED12@us-ex1.zend.net> References: <7.0.1.0.2.20100522175819.0a601c68@zend.com> <93EFAEF4-26F3-44A1-85ED-5E71E665B966@pooteeweet.org> <698DE66518E7CA45812BD18E807866CE0427ED12@us-ex1.zend.net> Date: Sat, 22 May 2010 19:08:10 -0400 Message-ID: To: Andi Gutmans Cc: Lukas Kahwe Smith , Josh Davis , Zeev Suraski , internals@lists.php.net Content-Type: multipart/alternative; boundary=00c09f8de539a0a761048736e162 Subject: Re: [PHP-DEV] Type hinting From: ilia@prohost.org (Ilia Alshanetsky) --00c09f8de539a0a761048736e162 Content-Type: text/plain; charset=ISO-8859-1 Andi, The existing functionality is very simple (no RFC) needed. It allows for scalar type hints and ensures that the Z_TYPE of the parameter matches the indicated type in the declaration, any mistmatch results in an error. On Sat, May 22, 2010 at 5:46 PM, Andi Gutmans wrote: > So which RFC should I be reviewing? Does this RFC reflect what Ilia's > patch does? I just want to be sure we are talking about the same thing > and can review and comment on it in detail. We've had many discussions > on this topic over the years and different people had different things > in mind so we need to make sure we have a good structured discussion > (and documented via RFC). > > Andi > > > -----Original Message----- > > From: Lukas Kahwe Smith [mailto:mls@pooteeweet.org] > > Sent: Saturday, May 22, 2010 1:39 PM > > To: Josh Davis > > Cc: Zeev Suraski; internals@lists.php.net > > Subject: Re: [PHP-DEV] Type hinting > > > > > > On 22.05.2010, at 18:30, Josh Davis wrote: > > > > > As you wrote, you worked on PHP's _type system_ which is dynamic, > > > really cool, juggles strings with ints and what not. However, the > > > topic here is the _type hinting system_. As far as I know, there's > no > > > "weak" type hinting; if a method signature hints for an array and is > > > given an integer, it throws a catchable fatal error. Therefore, as a > > > user, what I am familiar to is a strict _type hinting system_. > > > Anything else would feel inconsistent to me. > > > > > > can we please just stop calling a something a "type hinting" system, > which leads > > to a catchable fatal error when the type does not strictly match? > thats a very > > misleading euphemism. its simply strict typing, it has nothing to do > with hinting. > > > > anyway, yes there is a proposal for an actual hinting system as Zeev > has pointed > > out just a few mails early in the thread than yours: > > http://wiki.php.net/rfc/typecheckingstrictandweak > > > > regards, > > Lukas Kahwe Smith > > mls@pooteeweet.org > > > > > > > > > > -- > > PHP Internals - PHP Runtime Development Mailing List To unsubscribe, > visit: > > http://www.php.net/unsub.php > > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > --00c09f8de539a0a761048736e162--