Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:102392 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 6832 invoked from network); 24 Jun 2018 15:30:14 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 Jun 2018 15:30:14 -0000 Authentication-Results: pb1.pair.com smtp.mail=morrison.levi@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=levim@php.net; sender-id=unknown Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.215.54 as permitted sender) X-PHP-List-Original-Sender: morrison.levi@gmail.com X-Host-Fingerprint: 209.85.215.54 mail-lf0-f54.google.com Received: from [209.85.215.54] ([209.85.215.54:45718] helo=mail-lf0-f54.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 93/1A-13077-BF8BF2B5 for ; Sun, 24 Jun 2018 11:30:04 -0400 Received: by mail-lf0-f54.google.com with SMTP id m13-v6so2011835lfb.12 for ; Sun, 24 Jun 2018 08:30:03 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=msJ9MToaRw+VC/yg8xeTORNbhXMe1uzZCwkoPubuCvE=; b=ofA7eB/MC+jzIiVRBFIc/AVe2ALG+XCoXJ0kQmgQpoNjQoFQCRl6QKmfAna8N3F69p wfOpLZTaovaB+qGo4Aqr3Ele3phppZsDltyB8dKXp2Pv2u6ySDsG9GGSpif9wNFY0ksU sik10IJP4PQrQL04u6hAU7BHWjmGSvv8/lyGr81eKYSHeRmi0BLtRJoiOYHo8sMsc86d E/dKNvaA9ZuGMRwVylvh0r3ueKC9A2HJg5wJLKqWscDpNYCh1ZQpG10Hpyz5AlwEIyAa olShcQWtWenCNpDyKv04lgATastisiVLwcrQhzvuq4NLMPepPEO5KfRmDNzcf9VhVQ+4 HQgg== X-Gm-Message-State: APt69E1YhbVKUXcZihaCusErnwnckTpcKPmz4i1nEz6JaCxiGJLPmpE3 NvN6AuBnkUBywnC6wqDw3D/RH/DrfOMCV7Kd/Q0= X-Google-Smtp-Source: ADUXVKIjIAdQ1qnZkOR06VfDWZ4Aw9WprhM0XUTGIfFYF+jM98ECIx+ay4XNA8/P3DDoahxhUtBWjQ0R4FTfz8GLP/Q= X-Received: by 2002:a19:c403:: with SMTP id u3-v6mr382900lff.87.1529854199321; Sun, 24 Jun 2018 08:29:59 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Sun, 24 Jun 2018 09:29:37 -0600 Message-ID: To: rtheunissen@php.net Cc: internals Content-Type: text/plain; charset="UTF-8" Subject: Re: [PHP-DEV] Equality and relative ordering of objects From: levim@php.net (Levi Morrison) On Sun, Jun 24, 2018 at 8:11 AM Rudi Theunissen wrote: > > Here is a WIP implementation of `__compareTo`, with some decent tests. > > https://github.com/php/php-src/compare/master...rtheunissen:rt-compare-to-magic-method?diff=unified Help me understand the nullable return. If you are defining this operator then by definition you don't want the standard behavior, so why is returning null helpful? Seems like implementors ought to throw.