Arbitrary abbreviations in phobos considered ridiculous

deadalnix deadalnix at gmail.com
Fri Mar 9 01:28:12 PST 2012


Le 09/03/2012 10:07, Jonathan M Davis a écrit :
> On Friday, March 09, 2012 09:55:50 deadalnix wrote:
>> Le 09/03/2012 05:42, H. S. Teoh a écrit :
>>> On Thu, Mar 08, 2012 at 07:07:43PM -0500, Jonathan M Davis wrote:
>>>> On Thursday, March 08, 2012 12:10:07 H. S. Teoh wrote:
>>>>> IMO, making all abbreviations in Phobos consistent would be a big
>>>>> step forward.
>>>>
>>>> You know, people keep saying that the abbreviations are inconsistent,
>>>> but I don't buy that. _What_ abbreviations are inconsistent?
>>>
>>> [...]
>>>
>>> My comment was referring specifically to the pull request that adds
>>> "secs" as an alternative for "seconds". From what Walter said, he seems
>>> to be against any renaming changes, so any existing inconsistencies that
>>> we might find seems likely to be rejected as well.
>>
>> Why it isn't possible to support both ? And miliseconds as well a usecs
>> ? This make sense, as long as they are both common.
>
> Because it creates needless aliases. Now you have to remember _both_ of them,
> because they're both going to be used in code. And people reading code will
> wonder what the difference is. It just adds more confusion to the library and
> reduces its cohesiveness and consistency. It works far better to just have the
> one symbol. Isn't that one of the major complaints about PHP? That it has a
> ton of different ways to do the same thing?
>
> Walter and Andrei are very much against having aliases in the library just to
> create different names for the same stuff. And adding more options for the time
> units argument to the templates that use them is basically the same thing. So,
> we're not going to add such aliases. It's not like it's all that hard to learn
> the library, and none of the names are horribly wrong. They just don't happen
> to be the names that you prefer. You have to learn the names of the symbols of
> _any_ library that you use. This is no different.
>
> - Jonathan M Davis

This is not alias. This is about accepting template parameters. The 
actual isn't very consistent anyway (seconds, but usecs ?).


More information about the Digitalmars-d mailing list