Hi :)

I have a few questions regarding the comparable RFC:

https://wiki.php.net/rfc/comparable

Couldn't find the thread in my history and thus cannot respond directly
to any of the past threads. Maybe not that bad after more than a year of
silence. :)

My question might sound silly but I am genuinely interested in the
explanation: why `compareTo` and not `comparedTo` as method name? Is it
simply because of Java? To me it sounds kind of wrong:

    if ($this->compareTo($other) === -1) { }

Especially if we add a nice Ordering Enum with some real behavior to the
game:

    if ($this->compareTo($other)->isLess()) { }

Compare this to:

    if ($this->comparedTo($other)->isLess()) { }

This gets close to what I would understand as proper English. Then again
there might be valid reasons for the former name that I am not aware of?!?

There are other things that I think should be added along with this RFC.
However, I need to investigate a bit further first before going into
detail here.

-- 
Richard "Fleshgrinder" Fussenegger

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to