On 3/9/12 6:17 AM, Jonathan M Davis wrote:
On Friday, March 09, 2012 01:07:57 Jonathan M Davis wrote:
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.

If you want to read Walter's arguments on the matter as well as more detailed
discussion on this particular case, then just read the comments in the now
closed pull requested for adding "secs":

https://github.com/D-Programming-Language/druntime/pull/173

- Jonathan M Davis

Sample Ruby session:

> irb
ruby-1.8.7-p352 :001 > [1, 2, 3].count
 => 3
ruby-1.8.7-p352 :002 > [1, 2, 3].length
 => 3
ruby-1.8.7-p352 :003 > [1, 2, 3].size
 => 3

I never saw *anyone* complaining about this. When you write, you choose whatever is convenient to you (whatever comes to your mind first). When you read it, it's understandable. Nobody wonders "why didn't he wrote 'length' instead of 'size'", because the meaning is clear.

Reply via email to