4 ms·
There is a silver bullet that would make C++ very competitive for most of the web/db centric apps: It is Reflection/introspection capability built into the lan
by platform 14y ago
There is a silver bullet that would make C++ very competitive for most of the web/db centric apps:
It is Reflection/introspection capability built into the language.
Without it -- it is impossible to do DB structures to C++ structure mappings, or UI fields to C++ structures mapping.
There are of course work arounds (QT's macros, pre-compilers, etc).
Every time I approached this topic with some in C++ community, the answer always was ' C++ philosophy is -- if you do not use a feature of a language you will not pay a performance penality for it'.
Reflection, obvsiosly adds performance penalty.
When I suggest that it should be a compiler switch (like RTTI) -- the reply I get -- is that reflection cannot be turned on/off on per compilation unit., and instead must be on per project level.
But C++ standard does not define 'project level' compilation option -- therefore, not acceptable.
That's pretty much where this discussion gets stuck
- CCs 14y agoIndeed reflection is limited. There's a library called Reflex: http://root.cern.ch/drupal/content/reflex http://root.cern.ch/drupal/content/reflex SOCI uses generic template accessors to read/write full objects: http://soci.sourceforge.net/doc/exchange.html#object_relational http://soci.sourceforge.net/doc/exchange.html#object_relatio...