Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:37854 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 58506 invoked from network); 25 May 2008 08:28:43 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 25 May 2008 08:28:43 -0000 Authentication-Results: pb1.pair.com smtp.mail=helly@php.net; spf=unknown; sender-id=unknown Authentication-Results: pb1.pair.com header.from=helly@php.net; sender-id=unknown Received-SPF: unknown (pb1.pair.com: domain php.net does not designate 85.214.94.56 as permitted sender) X-PHP-List-Original-Sender: helly@php.net X-Host-Fingerprint: 85.214.94.56 aixcept.net Linux 2.6 Received: from [85.214.94.56] ([85.214.94.56:33243] helo=h1149922.serverkompetenz.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 54/74-21001-93329384 for ; Sun, 25 May 2008 04:28:42 -0400 Received: from MBOERGER-ZRH.corp.google.com (228-188.78-83.cust.bluewin.ch [83.78.188.228]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by h1149922.serverkompetenz.net (Postfix) with ESMTP id 29DB011F284; Sun, 25 May 2008 10:28:38 +0200 (CEST) Date: Sun, 25 May 2008 10:28:07 +0200 Reply-To: Marcus Boerger X-Priority: 3 (Normal) Message-ID: <1673206733.20080525102807@marcus-boerger.de> To: Felipe Pena CC: Arvids Godjuks , Jarismar Chaves da Silva , Derick Rethans , In-Reply-To: <1208519542.5321.6.camel@felipe> References: <1208404255.5665.34.camel@pena> <4807DA85.7090108@adplabs.com.br> <9b3df6a50804180022o22dabf92v906d6943c853e78@mail.gmail.com> <1208519542.5321.6.camel@felipe> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Subject: Re: [PHP-DEV] [RFC] Type hints (parameter and return value) From: helly@php.net (Marcus Boerger) Hello Felipe, please do not allow non optional parameters after optional parameters. Also default value NULL seems pretty odd for a numeric type and it might be an idea to only allow types matching the type hint. But I guess it is in line the current type hints and a good solution to mark those as not passed. You took care of reflection parameter but not of reflection method/function. What I do not like about the return type hint patch is that it adds the native types upfront. This is actually all that is discussable. Return type hints themselves were already agreed on. That said we only need to think whether your syntax is ok. And from that perspective you get my vote, too. So how about a limited patch first that does not introduce native types, only implements return type hints and does also add reflection for it. marcus Friday, April 18, 2008, 1:52:22 PM, you wrote: > Em Sex, 2008-04-18 às 10:22 +0300, Arvids Godjuks escreveu: >> +1 for strict types. >> >> That way it will be simple: >> * Don't need - then don't use at all >> * You need it - you use it fully. >> >> One thing than left to clearfy - do we allow to hint only part of args >> or do we go the road "if hint args, then hint them all!" (I'm >> personaly for second one - be strict) > No, just use in the arg that you want. > Example: > http://felipe.ath.cx/diff/tests/param_tests/param_type_hint_016.phpt > -- > Regards, > Felipe Pena. Best regards, Marcus