7 ms·
"C++11 still lacks a few useful libraries such as an XML API, sockets, GUI, reflection" that's a bit of a strange statement, no? Since when is a GUI or even an
by stinos 14y ago
"C++11 still lacks a few useful libraries such as an XML API, sockets, GUI, reflection"
that's a bit of a strange statement, no? Since when is a GUI or even an XML API part of the core language features? And adding reflection would, erm, kinda mean that every compiler has to be rewritten almost from scratch.
- stingraycharles 14y agoThere's rumour about C++14/C++17 supporting reflection: http://root.cern.ch/drupal/content/c14 http://root.cern.ch/drupal/content/c14
- vilya 14y agoThe c++ standard library is pretty sparse if you compare it to python's or java's, say. Good point about reflection; personally I don't miss it though. Where I would have used it in java, for example, I often find I can get a better result using templates - it just takes a bit more thought.
- qznc 14y agoC++ already needs runtime type information [0] for certain features (dynamic_cast, typeid). So the basic compiler infrastructure is already there. No need to "rewrite from scratch". Just add more information into the RTTI data structures and provide the mechanisms to inspect (optionally modify) classes. [0] http://en.wikipedia.org/wiki/Run-time_type_information http://en.wikipedia.org/wiki/Run-time_type_information
- stinos 14y agogood point actually, didn't think that through. Still full reflection like in C# for instance seems quite a long way from RTTI.