eliminate junk from std.string?

Don nospam at nospam.com
Wed Jan 12 11:13:18 PST 2011


spir wrote:
> On 01/11/2011 09:11 PM, Ary Borenszweig wrote:
>> "Welcome to D. Do you program in C, Javascript, Python or Ruby? Cool! 
>> Then you
>> will feel at home."
>>
>> That phrase currently ends like this:
>>
>> "You don't? Oh, sorry, you will have to learn that some names are all 
>> lowercase,
>> some not."
>>
>> But it could end like this:
>>
>> "You don't? Don't worry. D has the convention of writing all function 
>> names with X
>> convention, but we keep some aliases for things that we want to keep 
>> backwards
>> compatibility for."
> 
> Yop. And anyway those legacy names are not all the same in C, 
> Javascript, Python, Ruby, etc.. One has to be chosen or created for D, 
> why not follow a guideline for the standard D name?
> (I really cannot (under)stand this general politic of sticking at wrong 
> design choices from the past for generations and generations --even in 
> brand new languages. How do improvements happen in other fields than 
> programming? One day or the other, one needs to throw away old (mental) 
> garbage.)
> 
> Denis

Yes, I recently did the same with many of the math functions. tgamma --> 
gamma, lgamma -> logGamma.

It's pretty funny to try to find out why there is a 't' in front of 
'tgamma' in C.
http://pubs.opengroup.org/onlinepubs/009695399/functions/tgamma.html

"RATIONALE
     This function is named tgamma() in order to avoid conflicts with 
the historical gamma() and lgamma() functions."

And why the t? 't' stands for 'true'. Because the original gamma() had a 
bug.

Bravo.


More information about the Digitalmars-d mailing list