Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:54461 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 25819 invoked from network); 8 Aug 2011 11:07:17 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 8 Aug 2011 11:07:17 -0000 Authentication-Results: pb1.pair.com header.from=confik@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=confik@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.213.170 as permitted sender) X-PHP-List-Original-Sender: confik@gmail.com X-Host-Fingerprint: 209.85.213.170 mail-yx0-f170.google.com Received: from [209.85.213.170] ([209.85.213.170:53089] helo=mail-yx0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 95/21-17191-463CF3E4 for ; Mon, 08 Aug 2011 07:07:16 -0400 Received: by yxk30 with SMTP id 30so2405230yxk.29 for ; Mon, 08 Aug 2011 04:07:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; bh=7UNClgouEF19YVMG34ANPmL70yUPEsmoaBbjCJNR2rc=; b=gsPxJNPLh27greRIp1n2d2Sbi/RBEFh4ixalnQkG/vqPxe69XnhAI2WuS9HiwEHnYb sNBq3Z7W5iEXxSMUt9/v6bTNMqhrv33FPNLy8aul/NotHwEJlToQxUZ4zK1FyURKKCZh FUtkT+uJjDudUbYi/dsvMj1Ba1O/zbXjbX1eE= Received: by 10.101.144.19 with SMTP id w19mr441254ann.119.1312801633058; Mon, 08 Aug 2011 04:07:13 -0700 (PDT) MIME-Version: 1.0 Received: by 10.101.127.12 with HTTP; Mon, 8 Aug 2011 04:06:53 -0700 (PDT) In-Reply-To: <4E3FC098.9010605@php.net> References: <4E3F8D43.7000404@hoa-project.net> <1312789501.1485.3.camel@guybrush> <4E3FC098.9010605@php.net> Date: Mon, 8 Aug 2011 16:06:53 +0500 Message-ID: To: Sebastian Bergmann Cc: internals@lists.php.net Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] Add \Countable support to \Closure From: confik@gmail.com (Alexey Shein) 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. 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. > > =C2=A0ACK > > -- > Sebastian Bergmann =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0Co-Founder and Principal Consultant > http://sebastian-bergmann.de/ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 http://thePHP.cc/ > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > --=20 Regards, Shein Alexey