Templates everywhere

Bane branimir.milosavljevic at gmail.com
Mon Mar 15 01:51:39 PDT 2010


Walter Bright Wrote:

> Bane wrote:
> >> ======= C++ =========
> >> template<class T> class Foo
> >> {
> >>      T member;
> >> };
> >> ======= D ===========
> >> class Foo(T)
> >> {
> >>      T member;
> >> }
> >> =====================
> >>
> >> Yes, it looks like a trivial change, and perhaps it is. But it makes a 
> >> world of difference, because it now looks like something I do get - a 
> >> parameter list to something.
> > 
> > Fucking beautiful. I finally get it.
> 
> 
> Ya know what's funny? I had to go and double check that the C++ syntax 
> above was correct. Didn't have to do that for D.

D's example has look and feel of D, so it's intuitive. C++'s example may have l'n'f of C++, but it don't help because its ugly as crap by default and order of things in it make my eyes bleed and brain hurt. I hate <>. I like them only in XHTML.




More information about the Digitalmars-d mailing list