www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Re: eliminate junk from std.string?

Walter Bright Wrote:

 Ary Borenszweig wrote:
 Agreed. So what's wrong with improving things and leaving old things as

Clutter. One of the risks with Phobos development is it becoming a river miles wide, and only an inch deep. In other words, endless gobs of shallow, trite functions, with very little depth. (Aliases are as shallow as they get!) As a general rule, I don't want functionality in Phobos that takes more time for a user to find/read/understand the documentation on than to reimplement it himself. Those things give the illusion of comprehensiveness, but are just useless wankery. Do we really want a 1000 page reference manual on Phobos, but no database interface? No network interface? No D lexer? No disassembler? No superfast XML parser? No best-of-breed regex implementation? No CGI support? No HTML parsing? No sound support? No jpg reading? I worry by endless bikeshedding about perfecting the spelling of some name, we miss the whole show. I'd like to see more meat. For example, Don has recently added gamma functions to the math library. These are hard to implement correctly, and are perfect for inclusion.

Trivial solution: have a separate set of modules that contain the backward compatible aliases. Have those modules documented *separately* in an appendix. No Clutter and no problems. Want to use familiar functions from e.g. C++? just use: iimport compatibility.cpp.string; instead of: import string; Providing such packages would help programmers to transition from other languages to D and perhaps they should be optional addons to phoboes which are maintained separately.
Jan 12 2011