Should this work?
H. S. Teoh
hsteoh at quickfur.ath.cx
Thu Jan 9 15:34:28 PST 2014
On Thu, Jan 09, 2014 at 08:53:12PM +0000, Craig Dillabaugh wrote:
[...]
> Thats the thing. In most cases the correct way to do something in
> D, does end up being rather nice. However, its often a bit of a
> challenge finding the that correct way!
>
> When I had my troubles I expected to find the library solutions in
> std.string (remember I rarely use D's string processing utilities).
> It never really occurred to me that I might want to check std.array
> for the function I wanted. So what it std.array is imported when I
> import std.string, as a programmer I still had no idea 'split()' was
> there!
>
> At the very least the documentation for std.string should say
> something along the lines of:
>
> "The libraries std.unicode and std.array also include a number of
> functions that operate on strings, so if what you are looking for
> isn't here, try looking there."
Yeah, any public imports should be mentioned somewhere in the docs,
otherwise it's just random invisible magic as far as the end-user is
concerned ("Hmm, I imported std.string in one module, and array.front
works, but in this other module, array.front doesn't work! Why? Who
knows.");
Please submit a pull request to add that to the docs.
T
--
People walk. Computers run.
More information about the Digitalmars-d
mailing list