Understanding Templates: why can't anybody do it?

Nick Sabalausky a at a.a
Sat Mar 17 17:47:58 PDT 2012


"Entity325" <lonewolf325 at gmail.com> wrote in message 
news:vxadflowsujbbmpnrocg at forum.dlang.org...
>
> -While most of my programming professors had a decent idea of what they 
> were doing, the classes themselves left massive, gaping holes in my 
> education that I never even realized were there until I got a job writing 
> Java code.  I don't even particularly LIKE Java.
>

IMHO, that means you're smart :)

But you touched on an interesting thing about learning and knowledge: It's 
difficult to know how much is out there that you don't know. After all, if 
you're unaware of it, then how *can* you know that you're unaware of it? 
Arguably, one measure of personal progress is how much you suddenly realze 
there is that you *don't* know and didn't know.

As amateurs, we're opened up to a new world and tend to feel like we know 
everything about the subject and can do anything with it. Then as we 
progress we learn how much there really is left to learn. Sort of Zen or 
Tao, really.

> I messed around with Templates after making that post and learned that 
> they seem to behave similar to Generic types in Java

Definitely. Generic types in language like Java can be thought of as one 
specific special case of templates. Templates are a good way to do generic 
types, but then they can *also* do a lot more than just types.




More information about the Digitalmars-d mailing list