Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:85248 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 76769 invoked from network); 19 Mar 2015 23:00:28 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Mar 2015 23:00:28 -0000 Authentication-Results: pb1.pair.com header.from=rowan.collins@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=rowan.collins@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.53 as permitted sender) X-PHP-List-Original-Sender: rowan.collins@gmail.com X-Host-Fingerprint: 74.125.82.53 mail-wg0-f53.google.com Received: from [74.125.82.53] ([74.125.82.53:34949] helo=mail-wg0-f53.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A2/60-25408-B055B055 for ; Thu, 19 Mar 2015 18:00:27 -0500 Received: by wgdm6 with SMTP id m6so75203092wgd.2 for ; Thu, 19 Mar 2015 16:00:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=v2cm8mcJ3dSdahecwsmJsdNQdizyllAo5TSClxqNpAk=; b=AzyvmUA1ZTWvDnevKbtBGm+VGtl07ZXAQdpT91lRFMbeJReuRkVpewIyqCFWEQOQ7g 0Xi/srcOifumLutakNt8gNl+gI5a1kJpnkrL+BswB00i+Lvi5MXhvfDKbBGr1Qm/Tgg/ NEvQWfrJZvwpLYAyjZ9Ubdl41XcQWb21H0+Mf+6+FCz4FXt3Ije7tdD1VY50JfCkHCo9 D8MpPFRT0kMZ9y2y5MoIDOUhmFHiDOXQPNA+EURVbEWDGLPVti1I42x/TAW7vY+c/mlo U0H117PEZniBwCUSxkpLCfyO3apbL/tH2wfgY24IVCs+JgVUqAApFUQdseK0/7E4iM6S c9Hw== X-Received: by 10.194.185.9 with SMTP id ey9mr158394708wjc.135.1426806025093; Thu, 19 Mar 2015 16:00:25 -0700 (PDT) Received: from [192.168.0.5] (cpc68956-brig15-2-0-cust215.3-3.cable.virginm.net. [82.6.24.216]) by mx.google.com with ESMTPSA id l9sm508850wij.16.2015.03.19.16.00.24 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Mar 2015 16:00:24 -0700 (PDT) Message-ID: <550B5500.60004@gmail.com> Date: Thu, 19 Mar 2015 23:00:16 +0000 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: "internals@lists.php.net" References: <54BEC072.5000507@mabe.berlin> <54C28B63.1040506@gmail.com> <54C2E405.4090204@gmail.com> <550B49D8.4080608@gmail.com> In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Inconsistencies in callable, call_user_func and direct variable calls From: rowan.collins@gmail.com (Rowan Collins) On 19/03/2015 22:43, Yasuo Ohgaki wrote: > Hi Rowan, > > On Fri, Mar 20, 2015 at 7:12 AM, Rowan Collins > > wrote: > > On 19/03/2015 20:50, Yasuo Ohgaki wrote: > > Hi Sebastian, > > On Thu, Mar 19, 2015 at 9:48 PM, Sebastian B.-Hagensen > > >> > wrote: > > 2015-03-19 12:51 GMT+01:00 Yasuo Ohgaki > > >>: > > Distinguishing array and callable is problematic. > > Array callable is better to be deprecated in the long > run. IMHO. > > Then how would you write an callback containing an already > constructed object? > $a = [$object, 'method']; > > The alternative is unnecessarily cumbersome: > $a = function($methodArg1, $methodArg2) use($object) { return > $object->method($methodArg1, $methodArg2); }; > > > I'm not proposing deprecate it soon, but in the long run. > It will need a decade to deprecate it. > > > It is not time that is needed, but an alternative way of > expressing "use this instance method as a callback", such as those > discussed elsewhere in the thread. > > > I replied how it could be deprecated. > I'm not commenting for it, but the deprecation discussion. > You cannot restrict discussion to what you would want, can it? I had no intention of restricting the discussion in any way, apologies if it came across that way. Perhaps what I should have said is it is not *only* time that is needed - we need to design the replacement before it's worth even thinking about deprecating something. Regards, -- Rowan Collins [IMSoP]