4x4

Andrei Alexandrescu via Digitalmars-d digitalmars-d at puremagic.com
Thu Jan 8 13:16:44 PST 2015


On 1/8/15 11:48 AM, Johannes Pfau wrote:
> Am Thu, 08 Jan 2015 10:50:10 -0800
> schrieb Andrei Alexandrescu <SeeWebsiteForEmail at erdani.org>:
>
>> On 1/8/15 9:16 AM, Kiith-Sa wrote:
>>>
>>> This is a problem with naming, not with DDox. It would look bad
>>> regardless of generator, or regardless of documentation at all. You
>>> could make it look slightly less bad, but you might end up hurting
>>> other documentation. (I'm not implying  it should be renamed (bad
>>> reason for breaking compatibility), but I see no point in changing
>>> doc generation just because of some bad naming.)
>>
>> Sigh. No matter how I look at it, the same name repeated FOUR times
>> only evokes Java's factory factory etc. -- Andrei
>
> These 4x digest variants never occur in real code though:
>
> http://dlang.org/library/std/digest/digest/digest.digest.html is a
> class member function. You never use the full name,
> it's always instance.digest()
>
> http://dlang.org/library/std/digest/digest/digest.html could be used
> with the full name. But ironically the name is not used outside of
> std.digest so it's usually not necessary to use the full name.
>
> So it doesn't look nice in the docs but it's not a huge problem when
> writing code.

This is a matter common with words that are both noun and verb. "Let's 
have a Digest object that digests stuff." I think the review should have 
prompted a name change. -- Andrei




More information about the Digitalmars-d mailing list