eliminate junk from std.string?

Daniel Gibson metalcaedes at gmail.com
Tue Jan 11 13:20:06 PST 2011


Am 11.01.2011 21:11, schrieb Ary Borenszweig:
> "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."
>

I agree.
Using different conventions for naming functions etc makes a library look 
inconsistent.
Yeah right, those names are used in other languages, so people who know C, 
Javascript, Python and Ruby may feel at home (even though there may be similar 
functions with different names/writing and signatures in e.g. JS and Ruby so one 
still has to know, where exactly the function was "stolen").

I can to some degree understand to reuse C function names/signatures, with D 
being a successor and compatible and all, but reusing names (and especially 
their writing - lowercase, lowercase_with_underscores, CamelCase, ...) from a 
plethora of languages/libraries doesn't make Phobos look and feel consistent but 
stitched together like Frankensteins Monster.

It's definitely good to adapt functions that have proven useful in other 
languages/libraries. But they should be adjusted to fit within the style of the 
own library, especially when it's a standard library.

There is a D style guide ( http://www.digitalmars.com/d/2.0/dstyle.html ), so at 
least D's own standard library should comply with it :-)

Cheers,
- Daniel


More information about the Digitalmars-d mailing list