www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Learning D

reply Adrian Mercieca <amercieca gmail.com> writes:
Hi folks,

What's the best way to learn D please?

Thanks.
Jan 14 2011
next sibling parent Jens Mueller <jens.k.mueller gmx.de> writes:
Get "The D Programming Language"
http://www.amazon.com/D-Programming-Language-Andrei-Alexandrescu/dp/0321635361/ref=sr_1_1?ie=UTF8&s=books&qid=1295033396&sr=8-1

Jens

Adrian Mercieca wrote:
 Hi folks,
 
 What's the best way to learn D please?
 
 Thanks.
Jan 14 2011
prev sibling next sibling parent reply Jesse Phillips <jessekphillips+D gmail.com> writes:
Adrian Mercieca Wrote:

 Hi folks,
 
 What's the best way to learn D please?
 
 Thanks.
The best way is to read the book others linked to. Read some more, and ask questions. And here is a good place to start too: http://www.prowiki.org/wiki4d/wiki.cgi
Jan 14 2011
next sibling parent Russel Winder <russel russel.org.uk> writes:
On Fri, 2011-01-14 at 14:39 -0500, Jesse Phillips wrote:
 Adrian Mercieca Wrote:
=20
 Hi folks,
=20
 What's the best way to learn D please?
=20
 Thanks.
=20 The best way is to read the book others linked to. Read some more, and as=
k questions.
=20
 And here is a good place to start too: http://www.prowiki.org/wiki4d/wiki=
.cgi Read books (TDPL being the only one really just now) and write programs. Read more, write more programs. If you have a question, before asking it, write a program to investigate the problem. Create hypotheses, explore, experiment, write more programs. Read other programs, especially if they purport to solve the same problem you have written programs for. Then the crucial bit: you have to decide which programs are better programs in the language in which they are written. Whilst this is equivalent to being an NP-Complete problem, it is crucial to real learning. Knowing when a solution is better than another solution, using certain metrics, in a given context, is at the heart of understanding -- which is the goal of learning. --=20 Russel. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D Dr Russel Winder t: +44 20 7585 2200 voip: sip:russel.winder ekiga.n= et 41 Buckmaster Road m: +44 7770 465 077 xmpp: russel russel.org.uk London SW11 1EN, UK w: www.russel.org.uk skype: russel_winder
Jan 14 2011
prev sibling parent Jimmy Cao <jcao219 gmail.com> writes:
Well, if you don't want to get TDPL, you can also learn some other way.

I managed to learn some D by just reading the specification and trying
things out.
Took a bit more time, but it was during the summer and I had hours of free
time every single day.
Jan 14 2011
prev sibling next sibling parent reply Justin Johansson <nospam jj.com> writes:
On 15/01/11 05:48, Adrian Mercieca wrote:
 Hi folks,

 What's the best way to learn D please?

 Thanks.
Before you are lead misastray, which D would you like to learn? D1 or D2? Rumors have it that there might be a D3 as well. D1, D2 and D3 are not necessarily backward compatible. Some people might even suggest that D1 and D2 are different languages, albeit from the same Algol tree of programming languages fruit. I would advise you that if you are to take any responses from this newsgroup as gospel, to also ask in which context (D1 or D2) that they are responding. Knowing if you wanting after D1 or D2 will help you make a better informed decision as to whether or not invest your time and energy in "D" per se. Cheers Justin Johansson
Jan 17 2011
next sibling parent Jonathan M Davis <jmdavisProg gmx.com> writes:
On Monday 17 January 2011 05:15:04 Justin Johansson wrote:
 On 15/01/11 05:48, Adrian Mercieca wrote:
 Hi folks,
 
 What's the best way to learn D please?
 
 Thanks.
Before you are lead misastray, which D would you like to learn? D1 or D2? Rumors have it that there might be a D3 as well. D1, D2 and D3 are not necessarily backward compatible. Some people might even suggest that D1 and D2 are different languages, albeit from the same Algol tree of programming languages fruit. I would advise you that if you are to take any responses from this newsgroup as gospel, to also ask in which context (D1 or D2) that they are responding. Knowing if you wanting after D1 or D2 will help you make a better informed decision as to whether or not invest your time and energy in "D" per se.
True enough. However, most everything on this list refers to D2, since it is the current version of the language. D1 is in maintenance mode. D2 is intended to replace it (though you can obviously continue to use it if you want to). If there is a D3, then D2 will be put in maintenance mode, and eventually D3 will replace it. It's the same with other languages which have multiple versions. D2 happens to break more backwards compability than is typical when creating the new version of a language, but other languages have done the same (e.g. versions 2 and 3 of Python). Very few people on this list are likely to tell someone to learn D1 (though some may), because D2 is the current version of the language and the one that most everyone here is discussing and using (though there are a number of folks on this list who still use D1 - particularly for older projects). - Jonathan M Davis
Jan 17 2011
prev sibling parent reply Andrej Mitrovic <andrej.mitrovich gmail.com> writes:
Maybe a better question to ask is what is Adrian Mercieca's
background? Which languages does he already know, how much experience
does he have? Without knowing those, it's hard to give a proper answer
to OP's question.

TDPL is arguably not a "tutorial" for newbies, some experience with C
based languages is required to understand the book.
Jan 17 2011
parent Jesse Phillips <jessekphillips+D gmail.com> writes:
Andrej Mitrovic Wrote:

 Maybe a better question to ask is what is Adrian Mercieca's
 background? Which languages does he already know, how much experience
 does he have? Without knowing those, it's hard to give a proper answer
 to OP's question.
 
 TDPL is arguably not a "tutorial" for newbies, some experience with C
 based languages is required to understand the book.
Sadly there isn't any good beginners guide. While D would be a great language for such teaching, the material for it does not exist. And those that do make such an attempt are incomplete and are based on D v1. http://www.prowiki.org/wiki4d/wiki.cgi?FirstLanguage
Jan 17 2011
prev sibling parent reply Adrian Mercieca <amercieca gmail.com> writes:
Hi guys,

Ok - thanks for your answers.

So, I will get TDPL book - all reviewers on amazon are raving about it.

As for the Phobos class library (coz that is the D2 standard lib no?), how 
can I get to grips with that? Does the book cover that? Or does the book 
just cover the core language?
Is there some online material for Phobos?

Thanks.
Jan 20 2011
next sibling parent bearophile <bearophileHUGS lycos.com> writes:
Adrian Mercieca:

 As for the Phobos class library (coz that is the D2 standard lib no?), how 
 can I get to grips with that? Does the book cover that? Or does the book 
 just cover the core language?
 Is there some online material for Phobos?
Phobos is a work in progress, TDPL doesn't cover it. You need to read the online docs and practice :-) Currently Phobos2 is not huge, so it doesn't take too much time to study it. Maybe Andrei is writing a book about Phobos2 too. Bye, bearophile
Jan 20 2011
prev sibling parent Jonathan M Davis <jmdavisProg gmx.com> writes:
On Thursday, January 20, 2011 11:33:38 Adrian Mercieca wrote:
 Hi guys,
 
 Ok - thanks for your answers.
 
 So, I will get TDPL book - all reviewers on amazon are raving about it.
 
 As for the Phobos class library (coz that is the D2 standard lib no?), how
 can I get to grips with that? Does the book cover that? Or does the book
 just cover the core language?
 Is there some online material for Phobos?
TDPL mentions a little about Phobos but specifically avoids it on the whole, because Phobos is still very much a work in progress, and the intent of TDPL was to teach the language, not the library. The online docs for Phobos can be found here: http://www.digitalmars.com/d/2.0/phobos/phobos.html They're really the only way to learn Phobos at this point other than reading the source code, which is included in the zip file for the compiler. Overall, the documentation is fairly good though. The fact that the code can be documented in place (similar to javadoc or doxygen) makes it much easier to have good documentation. - Jonathan M Davis
Jan 20 2011