Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:102689 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 71391 invoked from network); 10 Jul 2018 09:36:02 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 10 Jul 2018 09:36:02 -0000 Authentication-Results: pb1.pair.com header.from=ocramius@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=ocramius@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.221.42 as permitted sender) X-PHP-List-Original-Sender: ocramius@gmail.com X-Host-Fingerprint: 209.85.221.42 mail-wr1-f42.google.com Received: from [209.85.221.42] ([209.85.221.42:42241] helo=mail-wr1-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id B9/5F-49043-BFD744B5 for ; Tue, 10 Jul 2018 05:35:56 -0400 Received: by mail-wr1-f42.google.com with SMTP id p1-v6so13843847wrs.9 for ; Tue, 10 Jul 2018 02:35:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=1K7NrXY6h/ICFQeVCwiqaqBLE0h1hhh8CP+Q0rwcWko=; b=I7aw5uHSZCNF03ANTyiPxNGdnxR4bcJfh4LkiVbn7Jrg1A9Cuaj9MYseYv0S2Q13yf tog+zbRcAyVvMARQ3rC8VMBAyA1JQjgpDeCWItwkNg226kH5Bvz+8eLN42EFR756fksg IPmHfUI+qjw2Q4p8hKw6zdf1wNOgE9dU6nKhmgWsCkRjT+W2KPkN6IZtjB7r3w5u0xrm 6KiwVKlQP8a4TVyL6F6+hBVcKBPpOV/A+DBoemMXUmcL5LcvPrY8NYjRKH4n3jcpHElL VI8RDIfBjjUED3ZutLD7/5Uu5MjQRsp1i+jJRAfmgggkVJLvzRJowq1XuCiIBNYbvoED 90xw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=1K7NrXY6h/ICFQeVCwiqaqBLE0h1hhh8CP+Q0rwcWko=; b=SjbtqKMEZrJvs0fAMUU+azONCfXEdRlia+KSEXNquEFhaOguMNeRPVW1RIhm5P7qIy brSa4FJ1F1FCH7iJc9SfO0RqVpTa5uY6vT2YBTkFeDjrlcWEzFPBGh8lA0EOIMRfGbFY 4SiUoaJaImv6a/aVtQwmIvAK3n8aeoa6puAIM5IiD3wyi6OthT8h4Q5SMqPvwp4exWw8 lm9cWT3IQ3HBU8eSvcKXCSOP670ePlMbfIEv3vVOjmRYm8RBCucxRuqR76MwksriUF5Y n5rKPVjxEVzCrvKfIdAK6VopVfUXd5DdGrIrL60Syc3/MW5OYbxi8sjCQwrEadjdAQ7j Z7ew== X-Gm-Message-State: APt69E2AwX0ikFLWBSKnYYi/AbgVT4eFslWhausyY3tw+2MDd7esqISP oxI2zI8tgLevbjLV9O7CRhdHkSa5ANdynZtMYGc= X-Google-Smtp-Source: AAOMgpcW10vlOdn0FscIkoLfiHtAGXWVnxdr4LVcprJdS7a9JgelzHUnBWCt/B+iIdrPo+xriX4EYhMrX37kga+BB3k= X-Received: by 2002:a5d:4b90:: with SMTP id b16-v6mr13376864wrt.168.1531215352889; Tue, 10 Jul 2018 02:35:52 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:adf:f190:0:0:0:0:0 with HTTP; Tue, 10 Jul 2018 02:35:32 -0700 (PDT) In-Reply-To: References: Date: Tue, 10 Jul 2018 11:35:32 +0200 Message-ID: To: Rudolf Theunissen Cc: PHP Internals List Content-Type: multipart/alternative; boundary="0000000000002f06190570a1dbdd" Subject: Re: [PHP-DEV] Re: [RFC] [VOTE] User-defined object comparison From: ocramius@gmail.com (Marco Pivetta) --0000000000002f06190570a1dbdd Content-Type: text/plain; charset="UTF-8" Heya! Just some background on my -1 vote: 1. the `==` operator is already riddled with edge cases and complexity, and it is overall advisable to stay away from it 2. comparison of value objects already works correctly with `==` (if we don't consider edge cases like `'0.' == '0.0'`) 3. the suggested approach is to add more interface-less reserved/magic methods: an `Eq` and an `Ord` class would have solved this much more elegantly and with clear type declarations that can be re-used in userland. With this patch, we have to rely on `method_exists()` instead. 4. It would also be much clearer to enforce that `Ord extends Eq`, rather than adding implicit "sorting implies equality" rules 5. "the methods are not restricted to instances of the same class" - this is something I disagree with, but we lack the type system facilities to declare the variance of the `Eq` and `Ord` operations for a specific class. Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On Mon, Jul 9, 2018 at 8:57 PM, Rudolf Theunissen < rudolf.theunissen@gmail.com> wrote: > Apologies for that middle discussion link, it was a bad hyperlink from a > bad paste if you look at source. > > Here are the correct ones: > > *Discussion:* > - https://externals.io/message/102337 > - https://externals.io/message/102473 > > > > On Mon, 9 Jul 2018 at 13:57, Rudolf Theunissen < > rudolf.theunissen@gmail.com> > wrote: > > > Hi everyone, > > > > With no further discussion and no objection to start voting on this RFC, > I > > would like to move forward with the vote, which requires a 2/3 majority > to > > pass. > > > > *RFC*: https://wiki.php.net/rfc/object-comparison > > > > Discussions: > > - https://externals.io/message/102337 > > (June 21) > > - https://externals.io/message/102473 (June 26) > > > > The vote will be open until 2018-07-16. > > > > Thank you, > > Rudi > > > > > --0000000000002f06190570a1dbdd--