www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Book recommendation

reply "alex" <alessino gmail.com> writes:
Hi,

I am considering diving into D and would like to start with a 
book.

I found the following two (if you have any other recommendation, 
please do recommend)

   
http://www.amazon.com/The-Programming-Language-Andrei-Alexandrescu/dp/0321635361/
   http://www.amazon.com/Learn-Tango-D-Kris-Bell/dp/1590599608/

but am unsure which one would be the "better" choice.

Any advice?
Oct 14 2013
next sibling parent reply "Adam Wilson" <flyboynw gmail.com> writes:
On Mon, 14 Oct 2013 14:01:13 -0700, alex <alessino gmail.com> wrote:

 Hi,

 I am considering diving into D and would like to start with a book.

 I found the following two (if you have any other recommendation, please  
 do recommend)

     
 http://www.amazon.com/The-Programming-Language-Andrei-Alexandrescu/dp/0321635361/
    http://www.amazon.com/Learn-Tango-D-Kris-Bell/dp/1590599608/

 but am unsure which one would be the "better" choice.

 Any advice?
Go with Andrei's book. It's more relevant to D today. -- Adam Wilson IRC: LightBender Project Coordinator The Horizon Project http://www.thehorizonproject.org/
Oct 14 2013
parent reply "alex" <alessino gmail.com> writes:
On Monday, 14 October 2013 at 21:02:29 UTC, Adam Wilson wrote:
 Go with Andrei's book. It's more relevant to D today.
Thanks for the prompt response Adam. How come its more relevant? If my scarce D knowledge does not mislead me Tango is the more recent library anyhow. So I'd assume the latter should be up-to-date as well, shouldnt it? cheers
Oct 14 2013
parent reply "Adam Wilson" <flyboynw gmail.com> writes:
On Mon, 14 Oct 2013 14:05:43 -0700, alex <alessino gmail.com> wrote:

 On Monday, 14 October 2013 at 21:02:29 UTC, Adam Wilson wrote:
 Go with Andrei's book. It's more relevant to D today.
Thanks for the prompt response Adam. How come its more relevant? If my scarce D knowledge does not mislead me Tango is the more recent library anyhow. So I'd assume the latter should be up-to-date as well, shouldnt it? cheers
That is actually incorrect. Tango was a replacement for the Phobos Standard Library in D1 to expand on the thin capabilities of the library at the time. In D2 (current D implementation) Phobos is now the default standard library and includes most of the functionality of Tango. Ergo, TDPL (Andrei's Book) is the current Gold Standard D book. -- Adam Wilson IRC: LightBender Project Coordinator The Horizon Project http://www.thehorizonproject.org/
Oct 14 2013
parent reply "alex" <alessino gmail.com> writes:
Thanks for the link John!


On Monday, 14 October 2013 at 21:09:32 UTC, Adam Wilson wrote:
 That is actually incorrect. Tango was a replacement for the 
 Phobos Standard Library in D1 to expand on the thin 
 capabilities of the library at the time. In D2 (current D 
 implementation) Phobos is now the default standard library and 
 includes most of the functionality of Tango. Ergo, TDPL 
 (Andrei's Book) is the current Gold Standard D book.
So Tango replaced Phobos, just to be replaced by Phobos later? What are/were the fundamental differences? Why two libraries? This admittedly kind of confused me :-D
Oct 14 2013
next sibling parent reply "Dicebot" <public dicebot.lv> writes:
 On Monday, 14 October 2013 at 21:09:32 UTC, Adam Wilson wrote:
 That is actually incorrect. Tango was a replacement for the 
 Phobos Standard Library in D1 to expand on the thin 
 capabilities of the library at the time. In D2 (current D 
 implementation) Phobos is now the default standard library and 
 includes most of the functionality of Tango. Ergo, TDPL 
 (Andrei's Book) is the current Gold Standard D book.
So Tango replaced Phobos, just to be replaced by Phobos later? What are/were the fundamental differences? Why two libraries? This admittedly kind of confused me :-D
Shotly: forget about Tango. It exists as an additional useful library right now for those who really need it. While your are a newbie you should not care about its existence at all. There was some bad history years ago but right now Phobos is standard library both de-facto and de-jure. Unfortunately, the Internet is still full of outdated crap from D1 times.
Oct 14 2013
parent "Dicebot" <public dicebot.lv> writes:
P.S. I'd recommend to start with free Ali's book 
:http://ddili.org/ders/d.en/index.html and then go for Andrei's 
"The D Programming Language". It is probably best short combat 
course one can get.
Oct 14 2013
prev sibling next sibling parent "Kiith-Sa" <kiithsacmp gmail.com> writes:
On Monday, 14 October 2013 at 21:12:57 UTC, alex wrote:
 Thanks for the link John!


 On Monday, 14 October 2013 at 21:09:32 UTC, Adam Wilson wrote:
 That is actually incorrect. Tango was a replacement for the 
 Phobos Standard Library in D1 to expand on the thin 
 capabilities of the library at the time. In D2 (current D 
 implementation) Phobos is now the default standard library and 
 includes most of the functionality of Tango. Ergo, TDPL 
 (Andrei's Book) is the current Gold Standard D book.
So Tango replaced Phobos, just to be replaced by Phobos later? What are/were the fundamental differences? Why two libraries? This admittedly kind of confused me :-D
It's a thing of the past. Phobos sucked so Tango was created. It was incompatible, leading to stdlib wars. Then D2 came, with a runtime that would allow both to work. Phobos improved, Tango slid to irrelevancy. A D2 port of Tango exists, but it's used only by a few diehards. Phobos surpasses it in most areas. If you need one of the few things Tango is better at, you can use it together with Phobos, like e.g. Boost with C++. Learning to program in D _based_ on Tango is a bad idea; it's a third-party library with not a whole lot of community around it (not to mention that book is very obsolete by now). Also, TDPL is an awesome book. And the Ali Cehreli's book (http://ddili.org/ders/d.en/index.html) is awesome too, and probably even more relevant right now as it's very recent.
Oct 14 2013
prev sibling next sibling parent "Tourist" <gravatar gravatar.com> writes:
On Monday, 14 October 2013 at 21:12:57 UTC, alex wrote:
 So Tango replaced Phobos, just to be replaced by Phobos later?
Tango was an "unofficial" replacement :)
 What are/were the fundamental differences? Why two libraries? 
 This admittedly kind of confused me :-D
Phobos sucked, so people made Tango. Now Phobos is not as bad anymore.
Oct 14 2013
prev sibling parent reply Nick Sabalausky <SeeWebsiteToContactMe semitwist.com> writes:
First of all, "Learn to Tango with D", while being a very good book (I
have it right here on my bookshelf) is rather old at this point, much
older than "The D Programming Language". It's based on D1, which
is mostly outdated and replaced by D2 at this point.

On Mon, 14 Oct 2013 23:12:56 +0200
"alex" <alessino gmail.com> wrote:
 So Tango replaced Phobos, just to be replaced by Phobos later?
 
 What are/were the fundamental differences? Why two libraries? 
 This admittedly kind of confused me :-D
Phobos has always been the "official" standard library. Historically (for D1), Tango *was* an incompatible alternate standard library (and very good for its time) created at a time when Phobos was still severely underdeveloped. That rift and incompatibility was a big PR disaster for D (and confused basically everybody new to D), so now, for D2, the incompatibility has been fixed: Tango is simply an optional third party library now, just like any other, that does NOT conflict with Phobos. And Phobos itself has grown considerably so there's no longer a need for a full replacement. That's all historical information, though. Bottom line, Phobos is the standard library. Tango is an optional third party library like any other, which you can use, or not, however you wish.
Oct 14 2013
parent "alex" <alessino gmail.com> writes:
On Monday, 14 October 2013 at 21:47:39 UTC, Nick Sabalausky wrote:
 That's all historical information, though.
History very often helps to understand the present :) Thanks for the insight, especially concerning "Tango with D"
Oct 14 2013
prev sibling next sibling parent "John Colvin" <john.loughran.colvin gmail.com> writes:
On Monday, 14 October 2013 at 21:01:15 UTC, alex wrote:
 Hi,

 I am considering diving into D and would like to start with a 
 book.

 I found the following two (if you have any other 
 recommendation, please do recommend)

   
 http://www.amazon.com/The-Programming-Language-Andrei-Alexandrescu/dp/0321635361/
   http://www.amazon.com/Learn-Tango-D-Kris-Bell/dp/1590599608/

 but am unsure which one would be the "better" choice.

 Any advice?
Andrei's is more relevant to modern D. Also, check out http://ddili.org/ders/d.en/index.html
Oct 14 2013
prev sibling parent reply "alex" <alessino gmail.com> writes:
Thanks everyone for your comments.
I went ahead and ordered TDPL.

But could anyone give me a concrete example, how Tango was better 
than Phobos and what improved now? I just would like to see what 
the main differences were and so on ..... just something short :)
Oct 14 2013
parent Nick Sabalausky <SeeWebsiteToContactMe semitwist.com> writes:
On Mon, 14 Oct 2013 23:41:10 +0200
"alex" <alessino gmail.com> wrote:

 Thanks everyone for your comments.
 I went ahead and ordered TDPL.
 
 But could anyone give me a concrete example, how Tango was better 
 than Phobos
Tango had things and features and stuff to use. Phobos...didn't. Phobos had things like writeln and not a whole lot else.
 and what improved now?
Phobos has useful stuff to use now ;)
 I just would like to see what 
 the main differences were and so on ..... just something short :)
At this point I'd say the main difference is that Tango is very Java-like where everything involves using a plethora of modules and classes, whereas Phobos is very simple and straightforward to use.
Oct 14 2013