|
Re: Your C++ Wish List (Editorial)
|
Posted: Jul 6, 2005 7:33 AM
|
|
> In the same spirit, I'm very afraid of the compile times > that all these new features will incur. > I also see my compile times skyrocketing.
Templates are largly used as workarounds for missing/incomplete features. So on the top of my wishlist is: -- remove Templates and replace them with: 1. subtype polymorphism, higher order functions (for generic programming) 2. make Types first order entities with (compiletime) type operators (for compile time programming/domain specific embedded languages) 3. allow compile time programming with all statically defined objects (explicitly including floats, strings, ...) 4. some access to the lexer (i.e. a _save_ macro replacement), which allows to specially handle user defined types and syntax (for domain specific embedded languages and to finally replace macros)
This should reduce boost, blitz, fc++, loki, ... to 30% of their size and make them compile _much_ faster.
Apart from that I'd like:
--Usable enum's for code like:
enum greyScale{white, grey, black}; int color[greyScale]; Range range(greyScale); for (range) { cout << color[range] << " "; // -> white grey black }
--Make implicit and default things explicit: e.g: class A { public: implicit A(int a) i(a) {} // implicit by demand default A(A&) {} // generate default constructors only when I say so int operator(){return i;} // explicit by default private: int i; };
-- direct support for multi threading (processes, threads, IPC)
|
|