Naming of new lazy versions of existing Phobos functions
Timon Gehr via Digitalmars-d
digitalmars-d at puremagic.com
Fri Jul 18 18:11:00 PDT 2014
On 07/18/2014 09:23 PM, Meta wrote:
> On Friday, 18 July 2014 at 17:59:05 UTC, Brad Anderson wrote:
>> On Friday, 18 July 2014 at 08:48:08 UTC, Walter Bright wrote:
>>> [...]
>>> Since there are a lot of existing lazy algorithms in Phobos that do
>>> not follow this naming convention, either the convention is pointless
>>> or we go through yet another round of changing Phobos names and
>>> breaking everyone's code.
>>
>> ...
>
> What user is going to think that's intuitive? It's not a bad idea, but
> it's terribly complicated and it doesn't even indicate the critical
> property of the function: that it's lazy. Let's just prepend -Lazy to
> the name and call it a day. Why prepend instead of append? Because the
> names will be sorted in lexical order and we want abbrevLazy to show up
> right below abbrev.
>
> - abbrev : abbrevLazy
> - capitalize : capitalizeLazy
> - center : centerLazy
> - detab : detabLazy
> - entab : entabLazy
> - format : formatLazy
> - leftJustify : leftJustifyLazy
> - munch : munchLazy
> - outdent : outdentLazy
> - removechars : removedCharsLazy
>
> ...etc.
No please.
- It's too long.
- lazyLazy(lazyLazyLazy,lazyLazy.lazyLazyLazy).
- There are already lazy ranges that do not have the suffix.
More information about the Digitalmars-d
mailing list