"A good programming language is far more than a simple collection of features. My ideal is to provide a set of facilities that smoothly work together to support design and programming styles of a generality beyond my imagination. Here, I briefly outline rules of thumb (guidelines, principles) that are being applied in the design of C++0x. Then, I present the state of the standards process (we are aiming for C++09) and give examples of a few of the proposals such as concepts, generalized initialization, being considered in the ISO C++ standards committee. Since there are far more proposals than could be presented in an hour, I'll take questions." Dr. Bjarne Stroustrup is the original designer and implementer of the C++ Programming Language.
Member since:
2005-07-08
Well, I admit, you can't decapitate a for loop with an inline function. But you also can't do this:
#define BAD_MACRO(x) if(x) cout << "Are macros bad?" << endl;
if(true) BAD_MACRO(might_be_zero);
else cout << "Macros are bad!" << endl;
Macros can change the way we think about truth.
Use inline functions in place of macros. If you need to inline something that isn't a function, you're doing something wrong. What's so bad about this?:
o.Lock();
// stuff
o.unLock();
That's the way C++ works, plus you avoid the unnecessary isLocked() call. Should C++ have multithreading primitives? Probably, but that's another issue.
Yes, I know you can extend C++ in all sorts of ways. But a lot of these hacks are workarounds for missing language features. You shouldn't need a special class to have a bounds-checked array. This should be an opt-out feature.
Edited 2007-08-13 22:08