On Wednesday, 24 June 2015 at 00:16:49 UTC, Tofu Ninja wrote:
On Tuesday, 23 June 2015 at 23:58:52 UTC, Vladimir Panteleev
wrote:
Another point: the range-ification of Phobos is only going to
continue. This means that, should this scheme be followed, the
number of functions with "Lazy" in the same is only going to
grow, and as these functions are intended to become the
canonical way to write modern D, so will the number of
occurrences of "Lazy" in a typical canonical D program. I
think this is a strong argument for avoiding "Lazy", at least
for functions which intend to displace their eager
counterparts.
But now you are going to have to come up with a clever name for
every replacement and the clarity of each will be shoty at
best. The append lazy convention at least is a convention that
is very clear, the other way has no rules, you just are making
up new names.
Well, it's true, any chosen decision is going to be a compromise.
Appending "Lazy" is only easy because the work to come up with
suitable names has already been done for the eager variants.
Finding suitable names for the lazy variants would entail doing
similar work, perhaps with a bit more effort to communicate that
this version is not eager.
I'll collect some data tomorrow to see if it's possible to find a
likeable convention for lazy function names. But even if this
will fail and we'll have to settle for inconsistency, I think
overall the situation will still be better than having "Lazy"
sprinkled everywhere. It will also be consistent with the names
so far (e.g. join/joiner) :)