Hacker News new | comments | show | ask | jobs | submit login

"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.




C++ 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


good point actually, didn't think that through. Still full reflection like in C# for instance seems quite a long way from RTTI.


There's rumour about C++14/C++17 supporting reflection:

http://root.cern.ch/drupal/content/c14


The 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.




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | DMCA | Apply to YC | Contact

Search: