Article: More hidden treasure in the D standard library

Chris via Digitalmars-d-announce digitalmars-d-announce at puremagic.com
Tue Sep 8 02:03:28 PDT 2015


On Monday, 31 August 2015 at 18:39:22 UTC, wobbles wrote:
> On Monday, 31 August 2015 at 16:09:02 UTC, Gary Willoughby 
> wrote:
>> I've written a new article on D here:
>>
>> http://nomad.so/2015/08/more-hidden-treasure-in-the-d-standard-library/
>>
>> Hopefully to drive other programmers to investigate D. It's a 
>> continuation of a similar one I wrote a few months ago which 
>> attracted over 60k readers. It's a simple overview of some 
>> cool features in the D standard library hopefully to fuel 
>> curiosity.
>>
>> Reddit link:
>>
>> https://www.reddit.com/r/programming/comments/3j3j87/more_hidden_treasure_in_the_d_standard_library/
>>
>> Up vote away. :)
>
> Nice article. I regularly find things like this where I spend a 
> couple hours implementing a solution, only to find its already 
> been done for me. Mostly occurs in std.algorithm.
>
> And it's not even lack of documentation, it's me thinking "this 
> will never be in the library, time to go do it myself". That 
> predSwitch code is a perfect example.

Same here. I've learned to go to Phobos first (mainly 
std.algorithm), before I come up with my own solution. But Phobos 
is so vast that it's easy to miss a gem or two. I'd appreciate 
more articles about how common problems can be solved with Phobos.

One issue I've encountered is that function names don't always 
reflect well what they do, so I filter them. This might be my own 
fault though.


More information about the Digitalmars-d-announce mailing list