Complexity nomenclature

Andrei Alexandrescu via Digitalmars-d digitalmars-d at puremagic.com
Fri Dec 4 08:00:38 PST 2015


On 12/04/2015 09:50 AM, tn wrote:
> However, my point is that it seems backwards if
> 1) When I don't care about the complexity, then I need to specify one
> (e.g. linearInsert).
> 2) When I care and want a constant complexity, then I don't specify one
> (e.g. use insert instead of constantInsert).

When complexity information is not present, the name of the function may 
carry an implicit and documented assumption of complexity bounds. -- Andrei


More information about the Digitalmars-d mailing list