In general, who should do more work: popFront or front?
surlymoor
surlymoor at cock.li
Tue Jun 15 05:03:45 UTC 2021
On Tuesday, 15 June 2021 at 04:57:45 UTC, mw wrote:
> In English, `front` is a noun, `popFront` have a verb in it, so
> you know who should do more work :-)
Sure, but, for example, the front method of Phobos' MapResult is
the one applying the predicate to the source's front. There's a
clear separation of responsibilities between popFront and front:
the former iterates over the source, and the latter performs an
operation that produces the range's elements.
More information about the Digitalmars-d-learn
mailing list