[Issue 4909] Two suggestions for std.algorithm.schwartzSort()

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Sep 16 10:20:37 PDT 2011


http://d.puremagic.com/issues/show_bug.cgi?id=4909



--- Comment #4 from Andrei Alexandrescu <andrei at metalanguage.com> 2011-09-16 10:20:10 PDT ---
(In reply to comment #3)
> (In reply to comment #2)
> 
> > Regarding naming, searching google etc. for schwartz sort yields relevant
> > results whereas key sort does not.
> 
> Schwartz sort is a common name and it's meaningful, but I am never able to
> remember its correct spell. Being it a very common operation (I use it about as
> often as the normal sort), I think it's better to rename it with a name that's
> simpler to remember (in spell) and maybe shorter too. Maybe Kagamin is not the
> only person that agrees on this.

If you are using schwartzSort heavily, it makes sense to define a local alias
for it. At any rate, you may be overstating your case; if you use something as
frequently as you claim, you _will_ know the spelling.

> If you don't like keySort (I was just a quick idea), then we may search for
> something else, that possibly uses only short and easy to spell English words.

It's not about what I like or not. It's about doing sensible things. It doesn't
seem sensible to simply decree that schwartzSort is inadequate to the extent it
affects the productivity of people using it, and then solve the remaining
problem of finding a different name for it.

> Google is handy in many situations, but it's not the Alpha and Omega when you
> have to give names to things.
> 
> "Schwart sort" gives 9,500 hits.
> "Decorate Sort Undecorate" gives 7,270 hits.

What would be the argument here? (That you unsubtly insert a typo, thus
underlining how you can't remember the right spelling?)

> > Please refrain from suggesting name changes of public APIs unless they add significant value.
> 
> Sorry, I'll keep suggesting what I think is better/right.

You are of course welcome to do so, but I'm just suggesting to invest energy in
things that may actually improve the state of affairs. You are suggesting a
change of name from a name that is easily searchable and memorable to a name
that you haven't even found yet but are sure is better.

> Also, this enhancement request if from 2010-09, and I think I have said that
> schwartzSort is a bad name from the beginning, from the first time I have seen
> it. So it was not really a "name change". It's a name change now.

The change didn't add value then, either.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list