Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:54462 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 27522 invoked from network); 8 Aug 2011 11:16:23 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 8 Aug 2011 11:16:23 -0000 Authentication-Results: pb1.pair.com header.from=dragoonis@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=dragoonis@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.216.42 as permitted sender) X-PHP-List-Original-Sender: dragoonis@gmail.com X-Host-Fingerprint: 209.85.216.42 mail-qw0-f42.google.com Received: from [209.85.216.42] ([209.85.216.42:54801] helo=mail-qw0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 4E/71-17191-585CF3E4 for ; Mon, 08 Aug 2011 07:16:22 -0400 Received: by qwi4 with SMTP id 4so2510537qwi.29 for ; Mon, 08 Aug 2011 04:16:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=OQO5gKx3Aqip7UODcWPkA/VSA4xYK6MNBqz0RtUG6ic=; b=Xui4j6SUDbDPNFr1NoMa8Tqa7q5rfSzHwNH3YepoQLysM4NfAhCxQ/+gwL6RqvcQXK xArKJ0BlpSnGiN85DPsfbhTCv2Xqx8Ioh0Xpzt8SBLb0i3SJlBSmbTmiSfGHVP+R8C3U efgZGx57R4awsYEY8u0jppHlzl2ojN8m6oepA= MIME-Version: 1.0 Received: by 10.229.67.26 with SMTP id p26mr670785qci.115.1312802178843; Mon, 08 Aug 2011 04:16:18 -0700 (PDT) Received: by 10.229.231.134 with HTTP; Mon, 8 Aug 2011 04:16:18 -0700 (PDT) In-Reply-To: References: <4E3F8D43.7000404@hoa-project.net> <1312789501.1485.3.camel@guybrush> <4E3FC098.9010605@php.net> Date: Mon, 8 Aug 2011 12:16:18 +0100 Message-ID: To: Alexey Shein Cc: Sebastian Bergmann , internals@lists.php.net Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] Add \Countable support to \Closure From: dragoonis@gmail.com (Paul Dragoonis) On Mon, Aug 8, 2011 at 12:06 PM, Alexey Shein wrote: > I think it's just a bad habit inherited from Javascript, where you can > do like this: > var a =3D function(a, b) { }; > alert(a.length); // shows 2 > > I don't think that PHP needs it, explicit method is way better. I am agreeing with the fact that we don't need any more magic in PHP and explicit methods go much further than any magic you can add to a language. > > 2011/8/8 Sebastian Bergmann : >> On 08/08/2011 04:49 AM, Etienne Kneuss wrote: >>> >>> I don't believe Countable implies ArrayAccess, but I do think that >>> Countable should only be implemented in cases where it is obvious what >>> it will return, for example collections. >>> >>> In this case, count(Closure) is really not that explicit, I'd rather >>> have an explicit method. >> >> =A0ACK >> >> -- >> Sebastian Bergmann =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0Co-Founder and= Principal Consultant >> http://sebastian-bergmann.de/ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 http://thePHP.cc/ >> >> -- >> PHP Internals - PHP Runtime Development Mailing List >> To unsubscribe, visit: http://www.php.net/unsub.php >> >> > > > > -- > Regards, > Shein Alexey > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > >