[haiku-commits] Re: haiku: hrev52172 - in src: add-ons/kernel/file_systems/packagefs/package add-ons/kernel/file_systems/packagefs/nodes kits/package

  • From: waddlesplash <waddlesplash@xxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Wed, 8 Aug 2018 08:01:17 -0400

On Wed, Aug 8, 2018, 4:25 AM Ingo Weinhold <ingo_weinhold@xxxxxx> wrote:

On 07.08.2018 21:19, waddlesplash wrote:
On Tue, Aug 7, 2018, 2:59 PM Ingo Weinhold <ingo_weinhold@xxxxxx
    Moreover, I don't think using the operator < makes reading this code
    particularly intuitive. I'd rather turn the operator into a method
with
    a fitting name, like HasPrecedenceOver(), HasHigherPriorityThan(),
    or ...


Well, one advantage of operator< is that if we ever start using some
templated list that does this sorting automatically, we won't need to
modify the code.

A sane implementation of such a container (respectively sorting
algorithm) may use the operator < as a default, but wouldn't hard-code
that as the only option. So the argument isn't a particularly good one.


OK, I guess that makes sense. I'll use HasPrecedenceOver.

-waddlesplash


Other related posts: