Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:37077 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 72149 invoked from network); 17 Apr 2008 16:00:56 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 17 Apr 2008 16:00:56 -0000 Authentication-Results: pb1.pair.com header.from=sam@sambarrow.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=sam@sambarrow.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain sambarrow.com from 208.70.128.56 cause and error) X-PHP-List-Original-Sender: sam@sambarrow.com X-Host-Fingerprint: 208.70.128.56 smtp-gw30.mailanyone.net Received: from [208.70.128.56] ([208.70.128.56:46329] helo=smtp-gw30.mailanyone.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 57/3E-05127-73477084 for ; Thu, 17 Apr 2008 12:00:56 -0400 Received: from mailanyone.net by smtp-gw30.mailanyone.net with esmtpsa (TLSv1:RC4-MD5:128) (MailAnyone extSMTP sam@sambarrow.com) id 1JmWXa-00049v-CJ; Thu, 17 Apr 2008 11:00:50 -0500 To: Felipe Pena Cc: internals@lists.php.net In-Reply-To: <46ccd1ab0804170742g142ed562t4f03339da549a820@mail.gmail.com> References: <46ccd1ab0804170742g142ed562t4f03339da549a820@mail.gmail.com> Content-Type: text/plain Date: Thu, 17 Apr 2008 11:58:27 -0400 Message-ID: <1208447907.32403.8.camel@sbarrow-desktop> Mime-Version: 1.0 X-Mailer: Evolution 2.10.1 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [RFC] Strict type hints (parameter and return value) From: sam@sambarrow.com (Sam Barrow) In this case, I'd suggest using my patch for parameter type hinting. It utilizes the current type hinting system for minimal code changes, whereas this is a whole new set of functionality. It also has scalar and number types, and supports objects with __tostring methods. On Thu, 2008-04-17 at 11:42 -0300, Felipe Pena wrote: > Hi. > > Well, thinking better about the behavior of type hinting, i decided to > change the proposal for strict type. I.e. don't accept numeric string > as an intenger, etc. > > If anyone wants use type hinting, i believe that it should be strict. > Otherwise, it makes more sense to not use it. > > Examples, patches and tests: http://wiki.php.net/rfc/typehint > > > -- > Regards, > Felipe Pena. >