Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:37072 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 56125 invoked from network); 17 Apr 2008 15:24:25 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 17 Apr 2008 15:24:25 -0000 Authentication-Results: pb1.pair.com header.from=felipensp@gmail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=felipensp@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.46.31 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: felipensp@gmail.com X-Host-Fingerprint: 74.125.46.31 yw-out-2324.google.com Received: from [74.125.46.31] ([74.125.46.31:37681] helo=yw-out-2324.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id AC/AA-05127-8AB67084 for ; Thu, 17 Apr 2008 11:24:24 -0400 Received: by yw-out-2324.google.com with SMTP id 5so69662ywb.83 for ; Thu, 17 Apr 2008 08:24:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:subject:from:to:cc:in-reply-to:references:content-type:date:message-id:mime-version:x-mailer:content-transfer-encoding; bh=xTWVBVsh6xm5p73origNJKyNACTcrUMl06PT2ykmzAU=; b=DbdSiNuS55dlgetzZNqknC4/Q+JLpRjfh4drWmROxUdDJml96lP3G8xPZ01e6Fm475J37AxIAaUFNja2DmAZddyU6RmuYjznguV1nd/KfSYG34gly2zMv8hlrk8QaOw5eXoL4QxYJBqt8HoJ4mEi9AuFqVD4H5rGAWIW2uieRXw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:from:to:cc:in-reply-to:references:content-type:date:message-id:mime-version:x-mailer:content-transfer-encoding; b=b8Hq1uK26oAgowpNrXcItBuE5G/AXQT4w7EH5hBXgNkckmMoXdvQi/bhSpbWYGDR14+8l4r3iSP6nKsVAnEcecKV1x1Q98ggoX5/jKsqBoo2j5pxaPhwFvuEk0eEZPZQUOQuhXoLWMuiPd36uINt8HEn4+vhF2MW+5Rh3+JoYFc= Received: by 10.150.49.15 with SMTP id w15mr1824041ybw.101.1208445862420; Thu, 17 Apr 2008 08:24:22 -0700 (PDT) Received: from ?10.0.18.8? ( [157.86.206.62]) by mx.google.com with ESMTPS id w43sm10636157hsa.3.2008.04.17.08.24.15 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 17 Apr 2008 08:24:21 -0700 (PDT) To: Paul Biggar Cc: internals@lists.php.net In-Reply-To: References: <46ccd1ab0804170742g142ed562t4f03339da549a820@mail.gmail.com> Content-Type: text/plain; charset=utf-8 Date: Thu, 17 Apr 2008 12:24:12 -0300 Message-ID: <1208445852.5366.31.camel@felipe> Mime-Version: 1.0 X-Mailer: Evolution 2.10.1 Content-Transfer-Encoding: 8bit Subject: Re: [PHP-DEV] [RFC] Strict type hints (parameter and return value) From: felipensp@gmail.com (Felipe Pena) Em Qui, 2008-04-17 às 17:17 +0200, Paul Biggar escreveu: > Hi Felipe, > > Thanks for making the change. This is much more consistent. It remains > that there is no 'scalar' or 'numeric' hint. Are you planning on > including them? No, i'm not planning to do that. > > I also wonder about allowing NULL for an 'array' type hint. Is this > acceptable? The patch seems to indicate it is. If so, why is this > allowed? I added yesterday an information about that in the doc: "Functions are now able to force parameters to be objects (by specifying the name of the class in the function prototype) or arrays (since PHP 5.1). However, if NULL is used as the default parameter value, it will be allowed as an argument for any later call." > > > Thanks, > Paul > > On Thu, Apr 17, 2008 at 4:42 PM, 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. > > > > -- > > PHP Internals - PHP Runtime Development Mailing List > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > > -- Regards, Felipe Pena.