Re: Polymorphism at run-time
On Apr 28, 10:58 am, p...@informatimago.com (Pascal J. Bourguignon)
wrote:
James Kanze <james.ka...@gmail.com> writes:
If you really needed to create classes at run-time, you would
have to use a more powerful programming language, such as
Common Lisp.
Or Scheme, or any number of other languages. What this
basically means is that they have a compiler for the language as
part of their runtime. Given the complexities of C++, that
would make for a very heavy runtime.
Which wouldn't matter for most applications given current
"standard" hardware,
Are you kidding?
which also means that C++ is not indicated for most
applications it's used for, but that's another problem.
It means that C++ isn't indicated for applications which must
generate code dynamically. For most applications today, the
ability to generate code dynamically would be a weakness, rather
than a feature. And additional source of potential errors,
which you can't really test, and a security hole that you have
to block. It's a vital feature for prototyping and experimental
programming, but something you want to avoid in production code,
which has to be reliable.
--
James Kanze (GABI Software) email:james.kanze@gmail.com
Conseils en informatique orient=E9e objet/
Beratung in objektorientierter Datenverarbeitung
9 place S=E9mard, 78210 St.-Cyr-l'=C9cole, France, +33 (0)1 30 23 00 34