Latest Proposals for C++0x 911
CodeDemon writes "It looks like the ISO/IEC JTC1/SC22/WG21 working group has made some headway in reviewing new proposals for the C++ language. The long anticipated upgrade for C++, C++0x, may be just around the corner. Head on over to check out the proposals yourself."
Re:Whatever. (Score:3, Informative)
Re:It keeps going and going.... (Score:3, Informative)
Well, since there was never a "C+" language, and you increment variables by one with "++" (hence the inherent joke in the name "c++"..."c incremented by one") a more logical construct would be (c++)++
Re:where does the name come from? (Score:5, Informative)
Re:where does the name come from? (Score:2, Informative)
C++98
C++0x.....the x will be replaced by a numberal for the year that the standard will finaly be ratified.
Re:Great... (Score:2, Informative)
Re:C++0x? (Score:3, Informative)
D Programming Language [digitalmars.com]
Vaporware? (Score:2, Informative)
Boost and STL (Score:2, Informative)
N1450 03-0033 A Proposal to Add General Purpose Smart Pointers
I've used parts Boost quite alot myself (www.boost.org), and found it very useful even when using Visual Studio.
Re:Great... (Score:2, Informative)
However, alot of code breaks when moving to VC .NET 2003 : for some reason they decided to remove classic headers, giving us _days_ of work. I've never had so much problems with a compiler as with VC .NET 2003 when trying to just build projects that have worked fine since VC 6.0.
Re:Why C didn't progress to D.. (Score:3, Informative)
So the "right around the corner" in the article is perhaps a little bit optimistic - they've just barely started working on the new version.
Re:Why C didn't progress to D.. (Score:5, Informative)
Re:SCO owns nothing but C++rap (Score:3, Informative)
Re:why not... (Score:4, Informative)
I've no idea if there was an A though.
Re:C++0x's biggest new feature... (Score:3, Informative)
I don't think it impacts memory footprint much... if you remember to set pointers to null when you've finished with them they'll free at roughly the same places as if you did it manually... with the advantage they won't leak if you forget.
Re:Great... (Score:3, Informative)
Re:why not... (Score:4, Informative)
Re:C++0x's biggest new feature... (Score:4, Informative)
1) Creating a smart pointer involves an extra heap allocation to allocate a counter. This is necessary because boost's smart pointers (which are the basis of the standard) are non-intrusive --- they don't require giving the target object a special counter. This overhead, can be eliminated by using intersive_ptr, which allows you to put the counter inside the object itself, and provide functions to increment/decrement it.
2) Copying a smart pointer involves an atomic increment of a counter.
3) Having a smart pointer go out of scope involves an atomic decrement of a counter.
4) When the last smart pointer is destructed, an extra heap free is needed to free the counter.
Re:Fragile Base Class problem (whining follows) (Score:1, Informative)
Re:c += 2 (Score:3, Informative)
The expression ++c++ is equivalent to ++(c++). Since the postfix increment operator yields an rvalue (unlike the prefix increment operator, which yields an lvalue), ++c++ is not a valid expression in C++.
Re:C++0x's biggest new feature... (Score:3, Informative)
Re:This will help out companies (Score:2, Informative)
You're welcome.
Re:Useful for structs/unions (Score:3, Informative)
Re:hehe.. sorta (Score:4, Informative)
To fill the matrix (which we assume is large enough to make copying the values expensive) directly, instead of copying it into a temporary matrix with the overloaded '+' operator then copying it over with the overloaded '=' operator. You could do
MatrixAdd(const matrix& m1, const matrix& m2, matrix& result);
but then what's the point of overloaded operators?
Re:~bs (Score:3, Informative)
The hard part is not in taking a compiler and getting it to construct Windows executables. The hard part is getting it to cooperate with the existing ABI well enough that you can integrate with the other compilers for the platform. This is much harder to do for Windows than it is for, say, *nix.
In other words, if Microsoft wanted to make it easy to make 3rd party compilers for the Windows platform, then they could have done so. I am claiming that they instead did the opposite, and made it difficult to construct and maintain a 3rd party compiler. I think even Borland would agree with me on this.
Is it Sun's fault that MS doesn't have a VB compiler for Solaris?
No, but in this hypothetical situation, if MS had investigated making a VB compiler for Solaris but gave up because of difficulties imposed by Sun, then some of the blame must go towards Sun.
Re:where does the name come from? (Score:2, Informative)
Re:where does the name come from? (Score:2, Informative)
A minor update to that standard will be published very shortly, depending on how the ISO machine works. That won't be what we're calling C++0x, it'll just be fixes for errors in C++98.
C++0x is the name given to the next major version of the C++ Standard, and it's some years away yet: expect 'x' to be large! Between now than and then there will be a "technical report", proposing extensions to the C++ library. It is likely to be widely supported, but a "technical report" (often abbreviated to TR) doesn't have the weight of a full ISO standard.
I really ought to update the comp.std.c++ FAQ to cover this...
Re:How 'bout range checking like purify? (Score:3, Informative)
Works for C, but probably can be made to work with C++ too by writing an operator new that uses malloc() internally. Not sure if glibc actually does that.
Re:Useful for structs/unions (Score:2, Informative)
Thus I can do this:
class Foo {
union {
char bob;
struct {
unsigned frank : 4;
unsigned jim : 4;
}
};
Foo bar;
and access bob, frank and jim via: bar.bob, bar.frank and bar.jim.
Who cares? (Score:5, Informative)
C++ on the other hand can have all the extra stuff it wants and it doesn't affect my project. If I don't wan to use templates or whatever, I don't have to. And the compiler won't force me to include anything.
Whining about C++ having too many features is like bitching that Baskin Robbins has too many flavors. Nobody is forcing you to buy them.
Ben
Re:More on D (Score:2, Informative)
Except that with the former, you can debug any time you need to, without using/loading a new (and different) executable. In addition, if you do it right, you can turn debugging on/off in a system without shutting it down (a feature that can be invaluable at times).
Using #ifdef DEBUG, you, by definition, change the executable, which can change the properties of the execution of the code (things like timing). Ever had a program that worked in debug mode but not -O2 mode? Ever put a printf() into the code that caused it to work but not having it there caused the program to crash? (not talking about using variables before a value is assigned or stack corruption)
Granted, #ifdef DEBUG can remove code that has cache destroying calls/code in it. However, just because #ifdef DEBUG can be more efficient does not mean that it is always the best approach to the problem.
Re:Compiler Compliance (Score:2, Informative)
The committee is generally not interested in adding features for the sake of adding features. New proposals are expected to fix a documented problem, and to show that they are valuable enough to justify the lack of stability they cause.
There is also clear recognition among the committee that C++98 was too inventive, and that anything significant that goes into C++0x should do so only after real-world experience with it has been obtained and reviewed. Hence the intention to publish a "technical report" on new library features -- it is likely that this TR will form the basis of much that will end up in C++0x, but its initial publication will not be in the form of an official standard.
Re:Cool (Score:2, Informative)
As far as type inference, I disagree.
cParentClass * foo = new cChildClass();
what's the redundancy of cFoo = new Foo(); ? You specify the type of the thing and then identify the creator and pass it information. Because you always have matched types and creators simply says that your code doesn't require some of the more complex leveraging of the language.
Auto seems convenient at first, but consider the potential for problems. And really, what does it gain you? Five or six keystrokes, in the greater scheme of things, really just isn't that important. Predictability and specificity are, in my opinion, far more important.
If you're so hard up for horizontal space that you can't make a single definition, stop tabbing 8 spaces, put a using or two in place, or get a bigger monitor. Jeez.
Re:SCO (Score:2, Informative)
That's about Cfront, not ANSI C++ Standard. But I am sure you knew that, and are just karma-whoring.
Re:More on D (Score:3, Informative)
Another problem is tools that do automatic code-folding have a much more difficult job with macros. I was using jGRASP because it does a great job of code-folding. The only problem is that it couldn't handle macros. So a macro that expands with a semi-colon to make a complete statement would be seen instead as the first token of the next statement. Now you may fault the programmer for not figuring out how to do code-folding with macros, but I believe the difficulty is inherent in the language itself. In order to handle macros properly, it would have to have a built-in preprocessor.
The third problem is code I'm reading or writing. It is often infuriating to try to figure out syntax problems that involve macros. The macros are supposed to make things easier, but instead they just make them opaque. One of the worst offenders is MFC, with macros like IMPLEMENT_DYNAMIC and AFX_*.
It seems problematic that to figure out the proper syntax of the language a preprocessor must be run first. The existence of the preprocessor has many advantages, but it has many detriments too. It invites API programmers to create macro-shortcuts that hide the syntax. These attempts at abstraction introduce all the problems of abstract languages (opaque-ness) while avoiding all the benefits of abstract syntax (safety, simplicity).
Re:This will help out companies (Score:2, Informative)
Sounds like you guys need to look at ACE. Multiple platform and implements all sorts of design patterns!
Just to warn the innocent... (Yes, I know that one can selectively use features, but this gives a perspective, don't you think?)
Re:remove export (Score:3, Informative)