between and among: worth Phobosization? (reprise)

Andrei Alexandrescu via Digitalmars-d digitalmars-d at puremagic.com
Thu Mar 26 15:48:26 PDT 2015


On 3/26/15 3:28 PM, H. S. Teoh via Digitalmars-d wrote:
> Don't like the name, though. Prefer 'isOrdered', otherwise it sounds
> like some kind of sorting algorithm (as in, returns an ordered sequence
> of its arguments).

Must be single-word name or nothing per Andrei's Hierarchy Of Naming 
Abstractions (AHONA). From low-level to high-level abstractions:

* If a realization is too simple and frequent, no abstraction should 
replace it.

* If a realization has high frequency but low complexity, it can only be 
replaced by an abstraction that is one simple word with no change of 
case. E.g. "among" is okay, "isAmong" is not.

* If a realization has high frequency and high complexity, it may be 
replaced by an abstraction with a multi-word name, little or no nesting, 
and few or no type parameters.

* If a realization has low frequency and high complexity, it may be 
replaced by an abstraction with a multi-word name, nesting, and type 
parameters.


Andrei



More information about the Digitalmars-d mailing list