Data structures and algorithms in D?

ShadoLight ettienne.gilbert at gmail.com
Mon Oct 8 12:38:07 UTC 2018


On Sunday, 7 October 2018 at 20:27:47 UTC, eastanon wrote:
> Are there reading resources on Data structures and Algorithms 
> in D? There are several such books in the C/C++ and Java world 
> and many senior/experienced D users might have come across them 
> in C. But for people who join D after reading Ali's book, a 
> data structures and algorithms book in D would be a great next 
> step. i.e. a book that uses D's idioms and best practices. Any 
> such material in development or recommended blog posts?

AFAIK there is no specific book that focuses and delves into Data 
structures and Algorithms specifically, however there are some 
books (besides Ali's) that touches on it - at least in a limited 
sense specific to the topics in each book.

For example, Adam D. Ruppe's 'D Cookbook' has a chapter on 
Ranges, which also covers using ranges when implementing/using 
algorithms.

Likewise Michael Parker's 'Learning D' book has 2 chapters that 
touches on Ranges and Algorithms:
- Chapter 6: Understanding Ranges
- Chapter 7: Composing Functional Pipelines with Algorithms
and Ranges

I'm not sure about Andrei's TDPL book - I read it so long ago I 
cannot remember. (And I don't have my copy with me so I cannot 
check). And Kai Nacke's 'D Web Development' book does not really 
cover these topics either.

Of the above-mentioned 2 books (that do cover it), I think 
Michael's book is the better resource at the moment (that I am 
aware of anyway). But I'm not sure if I will claim that it covers 
these topics better than Ali's book at the moment - so maybe it 
is not going to be good enough for you either.

Ali's book anyway seems to be regularly updated (since he 
self-publishes it) to be up-to-date with the latest in the D 
language/ecosystem, so I think we will see any new info on this 
in Ali's book before any other book manages to bring out a new 
edition (the other books just regularly published - so are in 
effect really snapshots of the language at the time of 
publication).

Of course, this is besides the problem that containers are 
(still!) somewhat lacking in D compared to other languages - you 
just need to look at [1] to see that.

[1] https://dlang.org/phobos/std_container.html



More information about the Digitalmars-d-learn mailing list