On Sun, Aug 17, 2003 at 03:25:45PM +0900, mgarriss wrote:
> I love Ruby, but in defence of C++...

The OP never mentioned C++.  I'm unclear as to why you feel C++ needs to
be defended here.

> ...I have to say the there is nothing quite like the C++ template...
> feature.  Metaprogramming is really interesting.  Doing factorial at
> no run-time cost (all at compile time), compile time parser
> generators, and such.  I'm currently working on a template lib that
> allows the end user to create/genterate Alife simulators (with
> behavior and rules they define) with one (mammoth) typedef.

IMO, metaprogramming is one of the worst "features" the C++ language has
to offer.  Code that makes heavy use of template or preprocessor
metaprogramming can be very slow to compile and can be very difficult to
understand.  Don't get me wrong; from a tinkering standpoint,
metaprogramming is insanely cool.  Metaprogramming in C++ has a strange
attraction to it, but I've seen people spend days trying to use template
metaprogramming to solve a problem that would have taken an hour to
solve with plain ordinary C++.

Nine times out of ten, I would argue that a code generator (perhaps
written in Ruby) would have equal run-time speed and much faster compile
time than an equivalent program that uses template or preprocessor
metaprogramming.

Paul