On Wednesday, 30 April 2014 at 16:48:50 UTC, Ola Fosheim Grøstad wrote:
On Wednesday, 30 April 2014 at 15:45:32 UTC, Andrei Alexandrescu wrote:
The name should indicate what you get (the calculating of a result), not
how the framework obtains it (sequential scan).

Making complexity an implementation detail is an antipattern. -- Andrei

Where did I say that?

I think the thrust of the statement is this: by shoving under the rug the method by which the length is obtained, it also conceals the algorithmic complexity and hinders good judgement on what tradeoffs are being made.

I can see the argument for either position, really. Personally, I think "calculate" sufficiently denotes that there's nontrivial work going into the process, but "walk" makes it fairly clear that O(n) should be expected.

It's an awkward discussion because neither is very discoverable in the first place; maybe make one an alias for the other and give people a sporting chance to find the damn thing?

-Wyatt

Reply via email to