Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:70757 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 79834 invoked from network); 19 Dec 2013 19:09:57 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Dec 2013 19:09:57 -0000 Authentication-Results: pb1.pair.com smtp.mail=tjerk.meesters@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=tjerk.meesters@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.212.52 as permitted sender) X-PHP-List-Original-Sender: tjerk.meesters@gmail.com X-Host-Fingerprint: 209.85.212.52 mail-vb0-f52.google.com Received: from [209.85.212.52] ([209.85.212.52:49621] helo=mail-vb0-f52.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id BF/B4-42949-48443B25 for ; Thu, 19 Dec 2013 14:09:57 -0500 Received: by mail-vb0-f52.google.com with SMTP id p5so909913vbn.11 for ; Thu, 19 Dec 2013 11:09:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=7T2E8zbsGKlhBnF17fCiFWjlE6YwAnndhI/kAFVWhH4=; b=uVsr5ea4ouZY9sEEkx2rTvOnKRAW2D1FNLMDBeAjT4mmydqdv4Ml22QpFstZ8KkcAk gzxQo5HtCq0TgJ8EKDjnVydSsY2d1uWdLmcGcNGv7JMP6tPqISXR/9KHK/4JNWqlS40Y oWI6v0zk3c/8IeeoEfGoR2sf2mXa64iM8uJkxarB2H5fVGKiDSeKm3xJKbw39JPiRKeW pdfn4IC/qyYb5qPNFhk48ctqA6ZwQ17pz3EoSpCYt3+ygfxu9IIU0FFVNgfTUu3sn5A3 bWqIiBN3mq6kEnWysPzyw2F2+OaDRSPdDewQjd1eXEg3llQ9b1/9kUiOyvfchS+DX2zL bRaA== MIME-Version: 1.0 X-Received: by 10.52.230.102 with SMTP id sx6mr1693898vdc.15.1387480193603; Thu, 19 Dec 2013 11:09:53 -0800 (PST) Received: by 10.58.128.33 with HTTP; Thu, 19 Dec 2013 11:09:53 -0800 (PST) In-Reply-To: References: <52B3362C.80108@ajf.me> Date: Fri, 20 Dec 2013 03:09:53 +0800 Message-ID: To: Sean Coates Cc: PHP Internals Content-Type: multipart/alternative; boundary=089e0111ae34129d6004ede7e8f1 Subject: Re: [PHP-DEV] Re: [vote] pow-operator From: tjerk.meesters@gmail.com (Tjerk Meesters) --089e0111ae34129d6004ede7e8f1 Content-Type: text/plain; charset=ISO-8859-1 Hi Sean, On Fri, Dec 20, 2013 at 2:18 AM, Sean Coates wrote: > Sorry I'm late (possibly too late?) to this, but: > > 1) if `pow()` is turning from a function into a construct, can it still be > used for callbacks? I don't see a mention of that part in the RFC. > It's implied in this section: No changes to existing code, safe for one: var_dump(pow([], 2)); // int(0) instead of float(0) Perhaps it could be made more obvious, but yes, the original function remains there to serve exactly the purpose of callbacks; its innards have been replaced by calling the PHP_SAPI pow_function(), though. > 2) if `pow()` drops the overhead of a function call, does `-3 ** 2` really > gain us anything over `pow(-3, 2)`? The latter is /far/ less ambiguous IMO. > Yes, it allows you to write an expression more naturally; regarding the second part of your question, `(-3) ** 2` is also far less ambiguous :) > S > > -- -- Tjerk --089e0111ae34129d6004ede7e8f1--