Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:54457 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 9685 invoked from network); 8 Aug 2011 08:26:35 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 8 Aug 2011 08:26:35 -0000 Authentication-Results: pb1.pair.com smtp.mail=ivan.enderlin@hoa-project.net; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=ivan.enderlin@hoa-project.net; sender-id=unknown Received-SPF: error (pb1.pair.com: domain hoa-project.net from 87.106.212.190 cause and error) X-PHP-List-Original-Sender: ivan.enderlin@hoa-project.net X-Host-Fingerprint: 87.106.212.190 s15355703.onlinehome-server.info Linux 2.6 Received: from [87.106.212.190] ([87.106.212.190:52475] helo=s15355703.onlinehome-server.info) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id AE/D0-04011-ABD9F3E4 for ; Mon, 08 Aug 2011 04:26:35 -0400 Received: from hwhost.local (85-218-15-56.dclient.lsne.ch [85.218.15.56]) by s15355703.onlinehome-server.info (Postfix) with ESMTPA id A10BDE4018; Mon, 8 Aug 2011 10:26:31 +0200 (CEST) Message-ID: <4E3F9DB6.3090006@hoa-project.net> Date: Mon, 08 Aug 2011 10:26:30 +0200 Reply-To: ivan.enderlin@hoa-project.net User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:5.0) Gecko/20110624 Thunderbird/5.0 MIME-Version: 1.0 To: =?UTF-8?B?Sm9oYW5uZXMgU2NobMO8dGVy?= CC: internals@lists.php.net References: <4E3F8D43.7000404@hoa-project.net> <1312789501.1485.3.camel@guybrush> In-Reply-To: <1312789501.1485.3.camel@guybrush> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] Add \Countable support to \Closure From: ivan.enderlin@hoa-project.net ("Ivan Enderlin @ Hoa") On 08/08/11 09:45, Johannes Schl=C3=BCter wrote: > On Mon, 2011-08-08 at 09:16 +0200, Ivan Enderlin @ Hoa wrote: >> Hi Internals, >> >> I would like to suggest you a new feature (for PHP5.4 or maybe next). >> The idea is to implement the \Countable interface into closures to >> easily count the arguments number. > NO! > One could add a getParmNo() or such if really needed while I think > reflection is better (as it also gives parameter information about > required/optional and type "hints") > > Countable implies ArrayAccess or such. If it is the semantics you ascribe to \Countable, then ok, there is no=20 problem :-). --=20 Ivan Enderlin Developer of Hoa http://hoa.42/ or http://hoa-project.net/ Member of HTML and WebApps Working Group of W3C http://w3.org/