|
Boost : |
From: Gabriel Dos Reis (gdr_at_[hidden])
Date: 2004-04-07 23:10:01
Nicolas Fleury <nidoizo_at_[hidden]> writes:
| Chris Smith wrote:
| > Is it such a bug that TMP does not "look more like regular C++
| > programming"?
| > I submit that some visual distinction is helpful (while not
| > endorsing the current baroque stylings) for grasping when stuff is
| > happening while reading the code.
|
| I would not mind to have another language for metacode, like a
| lisp-like language or something, as long as it looks more "designed
| for that" than what is currently done with templates. It works, but
As a well-known language designer once put it:
some languages are designed to solve a problem; others are designed
to prove a point.
Choose your camp :-)
| metacode or any equivalent solution would be so much more powerful and
| accessible. If we could iterate in metacode through types and member
| functions for example, imagine how more easy it could be to make
| complex compile-time assertions or make bindings to other languages
| like Boost.Python. It could make today's TMP code looks like old (or
| C) code using macros to simulate templates before their introduction.
| Maybe it could even be designed to make macros obsolete. My only
| concern with the metacode effort, is that I'm not sure C++ is the best
| language for its own metacode.
My concern is: "Who sits the baby-sitter?". If we need a metacode to
assits us generating C++ code, who assist us generating the metacode?
LISP answered that question fourty years ago... There ought to be a
way to close the loop. No, CPP is not an answer.
Work like FC++ are instructional as to what an answer may or may not
look like. Whether FC++ gets into Boost or not (I would rather it be
eventually part of Boost), it has intellectual and practical merits
that should not be minimized.
"Object-orientation" was invented in '60s and was deemed only of
intellectual values, available only in experimental or heavy
environments; C++ took it from research labs and put it in the
hands of Joe Programmer. With success.
Generic programming has been around since the '70s (albeit without
that name) and deemed only of academic values; C++ took it and put it
in the toolkit of Joe Programmer. With success. I have hopes it will
eventually do the same for functional paradigm.
-- Gaby
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk