Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:73618 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 8362 invoked from network); 7 Apr 2014 05:49:24 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 7 Apr 2014 05:49:24 -0000 Authentication-Results: pb1.pair.com header.from=theanomaly.is@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=theanomaly.is@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.212.173 as permitted sender) X-PHP-List-Original-Sender: theanomaly.is@gmail.com X-Host-Fingerprint: 209.85.212.173 mail-wi0-f173.google.com Received: from [209.85.212.173] ([209.85.212.173:54178] helo=mail-wi0-f173.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 66/10-07107-26C32435 for ; Mon, 07 Apr 2014 01:49:23 -0400 Received: by mail-wi0-f173.google.com with SMTP id z2so4412058wiv.12 for ; Sun, 06 Apr 2014 22:49:20 -0700 (PDT) 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=wd0lP1jRrOM4Ui63ZdSS90Y+fC3eT2k9mG2kw0CvH3w=; b=u7P+kzqpT/qW4gNLM9YK91S26WpVzy9y9qWKJAyRrTp9pa/P2MG+fJnUVdAwyr/QDO SSsyKC+DZLNMiYmibFJ8KuMOYEOKq7h0MDggqWkzfUuv/Ga9k4qjxv73Vd42TRpVuThK Yb4JHnTqnSbz6JCXhlKKI83VdV35zvEcMat/HTvVAzpQXaIBV0Wf216q6KJe1QmlCsyk VAfIqaoiZXjtnU/0soBNKuOBzORy0AsYxXC54E8duR3RtmdVkFil+n/1teLy3h100HjT OiIuWJ1np0ugPyIu8uSAun88tnV1pp2qlNc00cq/2MGWjAI3iun3LFj3qLxCedfvIwyj ShFw== MIME-Version: 1.0 X-Received: by 10.180.160.166 with SMTP id xl6mr23111398wib.42.1396849760019; Sun, 06 Apr 2014 22:49:20 -0700 (PDT) Received: by 10.227.43.3 with HTTP; Sun, 6 Apr 2014 22:49:19 -0700 (PDT) In-Reply-To: <5341F12B.5070907@sugarcrm.com> References: <5341F12B.5070907@sugarcrm.com> Date: Mon, 7 Apr 2014 01:49:19 -0400 Message-ID: To: Stas Malyshev Cc: PHP Internals Content-Type: multipart/alternative; boundary=047d7b66f9cbc02ace04f66d6d24 Subject: Re: [PHP-DEV] Pull 638 - floats in user-defined comparisons From: theanomaly.is@gmail.com (Sherif Ramadan) --047d7b66f9cbc02ace04f66d6d24 Content-Type: text/plain; charset=ISO-8859-1 On Sun, Apr 6, 2014 at 8:28 PM, Stas Malyshev wrote: > Hi! > > I looked at pull 638 and it looks OK code-wise. Are there any objections > still to merging it? It changes behavior slightly and the warning in the > docs no longer applies, but I think new behavior is actually better than > the old one as for most doubles between -1 and 1 we do not get random > sorting behavior anymore. > I'm not entirely sure if this is such a good idea, but I also can't say it's a bad idea. It'll likely break someone's code out there that relies on the existing behavior (for some strange reason). I thought it was actually a better idea to document the behavior. Which is why I added the caution in the manual. It's simpler and removes the ambiguity about what's expected from the callback. This PR just adds some complexity for little more than added magic. I'm not a fan of magic in general, but I can see how most users think of magic as being useful... That is of course, until it comes back to bite them. Not opposed to merging this, but just my 2 cents. --047d7b66f9cbc02ace04f66d6d24--