On 02/04/2011 06:30 PM, Andrej Mitrovic wrote:
On 2/4/11, spir<denis.s...@gmail.com>  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)

I've read this thrice ;-) Precisely, this doc is nice & rather good; but, for me, doesn't answer the /base/ question. You'll find there what you need if you already have an idea on what you're supposed to need it for. Reason why I chose these example, precisely... but there are tons of parts of D2 that would benefit of a good introduction, really starting from the base (and not implicitely assuming 10 years of C++ programming --esp. about vocabulary: people here don't seem to realise how much words they use everyday can be misleading coming from != background, or even not be used elsewhere in programming).

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. :)

Yop, thanks for 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 do agree. I also miss a great picture of D2, and even more of Phobos2 ('s future overall design). But aren't both necessary? If one doesn't get a given feature's purpose, how can it find its place meaningfully in the great picture?

Denis
--
_________________
vita es estrany
spir.wikidot.com

Reply via email to