Andrej Mitrovic wrote: > On 2/4/11, spir <[email protected]> wrote: >> >> About that, I would love a tutorial about eponymous templates starting >> with their /purpose/ (why does this feature even exist? what does it >> /mean/? what does it compare/oppose to? why is one supposed to need/enjoy >> it? how is it supposed to help & make code better mirror model?) Same for >> alias template params. Same for a rather long list of features, probably. >> > > But both of these are already explained in the manual: > http://www.digitalmars.com/d/2.0/template.html (search for Implicit > Template Properties) > http://www.digitalmars.com/d/2.0/template.html (search for Template > Alias Parameters) > > Granted, eponymous templates aren't explained in much detail on that page. > As for explaining how they work together, I did write that short > template tutorial > (http://prowiki.org/wiki4d/wiki.cgi?D__Tutorial/D2Templates), but > you've already seen that. :) > > However, I do not think we should write tutorials on single features > alone. I've read a bunch of books that explain the language in > feature-by-feature basis, but neglect to tie everything together. For > example, "Learning Python" is this 1200 page book about Python 3, > explaining the language feature by feature but never really discussing > the language as a whole. It's only good as a reference, which > ironically defeats the book's title. OTOH "Dive into Python 3" > gradually introduces you to more features of the language, but always > has code examples where you can see multiple features of the language > being used. (IIRC there were string processing examples which used > regex, multiple modules, and unittests all at once). > > Having a perspective on how all features tie together is crucial to > understanding the purpose of individual features themselves. In my > opinion!
I agree, most of the 'dive into' books are excellent and complementary to reference materials. TDPL also has great little examples that illustrate the why of things, without ever becoming a mindless tutorial. It's hard to write such things however (witness the abundant amount of horrible technical writing), I truly admire those who can.
