On Wed, 27 Apr 2011 17:30:54 -0400, Alexander <[email protected]> wrote:

On 27.04.2011 19:13, Steven Schveighoffer wrote:

clear is not a keyword, it is possible to name a member clear, and also have a clear global function.

Sure it is, though it is counter-intuitive - to use same name with quite different meaning. As for me, if this will really be in final spec, I'll always alias it to destroy().

That has been pointed out before. Yes, it is considered a bad idea to do that, but we have no choice now, clear is the name.

I probably would consider changing the name of dcollections' function that empties all elements. Clear is a very good name for that, but maybe it should be something else to avoid confusion.

BTW, could you please point me to "the ultimate authority"? I am referring to your "The name choice is no longer up for debate. It's already set in print, and in the language." - so far, I was thinking that DigitalMars website is the one, but your
words make me wonder, if this is still true.

http://www.amazon.com/gp/reader/0321635361/ref=sib_dp_pt#reader-link

And, since there is a phrase: "It is not governed by a corporate agenda or any overarching theory of programming. The needs and contributions of the D programming community form the direction it goes." I would like to know, how "the community" come
to this choice, which is quite confusing, at least.

clear is Andrei's idea, he proposed it on the newsgroups.

Here was the first mention of it.

http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D&article_id=97688

I'm not sure if anyone really debated the name until it was already part of the language, not much was said about the name in that thread. I know many people have questioned the name of it after it was already in the language. It may have caught some by surprise.

-Steve

Reply via email to