Would you recommend TDPL today?

Jonathan M Davis newsgroup.d at jmdavisprog.com
Tue Jan 16 02:58:03 UTC 2024


On Monday, January 15, 2024 7:25:32 PM MST matheus via Digitalmars-d-learn 
wrote:
> Hi, I'm mostly a lurker in these Forums but sometimes I post here
> and there, my first language was C and I still use today together
> with my own library (A Helper) which is like a poor version of
> STB (https://github.com/nothings/stb).
>
> I usually use D language sometimes as C on steroids, using AA and
> GC and some other features, but I never entered in this realm
> very deeply.
>
> I always wanted to dive in and I always postponed, but I decided
> to go a littler deeper, and I thought about going with The D
> Programming Language, but as I see it is from 2010, and I wonder
> if is it a good resource to go currently?
>
> I don't care about the age of the book, since I learned C in late
> 90's with Kernighan and Ritchie "The C Programming Language", but
> at time C was "stable", now I think D maybe has evolved much more
> in these 14 years, so I'm a bit on the fence.
>
> Any thoughts or recommendations?
>
> Thanks,
>
> Matheus.

>From what I recall, it's mostly still correct, but there are things in there
that have since changed or which were never implemented (e.g. synchronized
classes never became a thing; synchronized functions still exist, but TDPL
talks about them being replaced with synchronized classes and that never
happened - and likely will never happen). There's also an errata for it, but
AFAIK, that just fixes some mistakes it; it doesn't update it. This wiki
entry tries to list some of the differences, but I expect that it also is
rather out-of-date at this point:

https://wiki.dlang.org/Differences_With_TDPL

So, TDPL is a good resource, but you have to take into account the fact that
some of the details are wrong, which you may not want to do. In that
respect, Ali's book would likely work better:

http://ddili.org/ders/d.en/index.html

It was written more recently, and I'm pretty sure that Ali has updated it on
some basis. I fully expect that there are things that you'd get out of TDPL
that you wouldn't get from Ali's book, so there's definitely something to
said for reading both, but again, whether that makes sense largely depends
on whether you want to deal with figuring out which parts of TDPL are still
valid.

- Jonathan M Davis





More information about the Digitalmars-d-learn mailing list