On 4/26/07, skaller <[EMAIL PROTECTED]> wrote:
> Just try to tell one of the people that like 'meta-programming'
> that it is a load of rubbish and that templates are one of
> the things Felix deliberately replaces (with parametric
> polymorphism and typeclasses) .. well of course I'm going
> to get off on the wrong foot, trying to explain what's
> wrong with templates and why C++ 'meta-programming' is
> a complete and utter joke.

I just finished a class where we had to do significant Java
programming (ick!).  My group partner knew a little Java but was
mostly a C++ programmer.  He had no clue about generics in Java 1.5,
so I gave him a rough outline of the problem they solve, and
immediately he said "oh, those are just like templates in C++".  So I
think to the average C++ programmer, Felix's polymorphism and
typeclasses would seem "equivalent" to templates and could be
presented (in a C++-oriented tutorial) as such.

Now I don't know enough about C++ to judge how much of the template
system's functionality the typical C++ programmer uses, but I'd guess
most programmers use it for nothing more than polymorphic type safety
and could transition to Felix's type system without needing to be
convinced of its benefits: in their eyes the systems are "equivalent".

Of course, the question remains why would programmers who don't use
C++'s advanced features be drawn to Felix in the first place?  I'd
venture to say that if they were trying to learn metaprogramming (or
what-have-you) and failing, or felt trapped by the complexity, they'd
see Felix and say "oh wow, it's so much easier this way".  At least,
that's what I thought when I switched to O'Caml from Python :)  So
maybe that's another way to advertise Felix... instead of coming out
and saying "typeclasses are better than templates because...", just
demonstrate that typeclasses solve complex problems in simple ways,
and C++ programmers looking for something better will see that and
convince themselves of the benefits.

- Chris

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Felix-language mailing list
Felix-language@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/felix-language

Reply via email to