Linked by Thom Holwerda on Mon 13th Aug 2007 17:57 UTC
General Development "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.
Permalink for comment 263180
To read all comments associated with this story, please click here.
RE[4]: C: Esperanto
by butters on Mon 13th Aug 2007 22:06 UTC in reply to "RE[3]: C: Esperanto"
butters
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

Reply Parent Bookmark Score: 2