Linked by Hadrien Grasland on Wed 15th Jun 2011 07:32 UTC, submitted by ebasconp
General Development "The recently finished C++ ISO standard, with the working name of C++0x, is due to be published this summer, following the finishing touches to the ISO spec language and standards wonks agreed upon in March."
Thread beginning with comment 477252
To view parent comment, click here.
To read all comments associated with this story, please click here.
RE[2]: Basically, awesome
by Neolander on Wed 15th Jun 2011 12:18 UTC in reply to "RE: Basically, awesome"
Neolander
Member since:
2010-03-08

I too would like to see a much simplified C++ design, instead of even more features added with few things removed. But I fear that we each would like to keep/remove a very different set of features, sort of proving Stourstup's point of creating a monster-sized "multi-paradigm" language.

As an example, I like that C++, like C, is good for all OS layers, provided that you are cautious with some features. But many other persons would probably prefer something that's fine-tuned for application-level development, and totally drops the power and control needed for low-level use in favor of extra comfort.

Reply Parent Score: 3

RE[3]: Basically, awesome
by moondevil on Wed 15th Jun 2011 12:32 in reply to "RE[2]: Basically, awesome"
moondevil Member since:
2005-07-08

I doubt it will happen any time soon.

Personally I would like to have a more type safe systems language available. Joining the low level power with the high level expressiveness.

Sadly most of the languages that tried to displace C++, never fully managed it.

The main reason is that there isn't any other multi-paradigm language with C++ power that is currently available. Maybe only Ada would be one, but I won't see anyone wanting to jump ship to it.

And tool vendors are slowly bringing their C++ tooling to the same level we already have in managed languages.

The LLVM project has already shown how much error reporting and static analysis can be improved if the compiler is integrated into the tooling.

Reply Parent Score: 4

RE[4]: Basically, awesome
by Neolander on Wed 15th Jun 2011 12:46 in reply to "RE[3]: Basically, awesome"
Neolander Member since:
2010-03-08

Personally I would like to have a more type safe systems language available. Joining the low level power with the high level expressiveness.

What would you call more type safe ? Something where you can't joyfully cast a pointer into an integer of the same size and vice versa ?

Sadly most of the languages that tried to displace C++, never fully managed it.

The main reason is that there isn't any other multi-paradigm language with C++ power that is currently available. Maybe only Ada would be one, but I won't see anyone wanting to jump ship to it.

I think that it's more about legacy. C++ code is everywhere. Powerful C++ compilers are everywhere, and target everything. Documentation about the internals of C++ code generated by various popular compilers is also everywhere.

If I wanted to implement an OS in, say, Pascal Object, I think the most painful part would be missing low-level documentation, not some intrinsic language inferiority.

And tool vendors are slowly bringing their C++ tooling to the same level we already have in managed languages.

The LLVM project has already shown how much error reporting and static analysis can be improved if the compiler is integrated into the tooling.

Yup, I've seen it too. Pretty impressive, hope that the GCC team will start to work on it too at some point.

Edited 2011-06-15 12:48 UTC

Reply Parent Score: 1

RE[4]: Basically, awesome
by FealDorf on Thu 16th Jun 2011 22:47 in reply to "RE[3]: Basically, awesome"
FealDorf Member since:
2008-01-07

Type safety has nothing to do with nominal typing. OCaml and Haskell have a (more powerful) version of the type system in Go. For most part, C++'s class system is mostly restricted VTables. Greater flexibility and consistent type system has nearly always been better for languages..

PS: I have only cursory knowledge of most of these languages. I love C++ for the templates, not so much a fan of the class system

Edited 2011-06-16 22:51 UTC

Reply Parent Score: 2

RE[3]: Basically, awesome
by kragil on Wed 15th Jun 2011 12:53 in reply to "RE[2]: Basically, awesome"
kragil Member since:
2006-01-04

Maybe a good solution would be to define use cases and subsets.

Something like Qt forces you to write very different C++ than when you write low level system stuff. So have Qt-C++ and system-C++.

Maybe the guys who like ot define ISO standards are the wrong people to ask for something like that.

I guess once GO gets its concurrent GC a lot more people will see the light and only face the C++ monster when they really have to. Let's talk again in 10 years ;)

Reply Parent Score: 2

RE[4]: Basically, awesome
by Neolander on Wed 15th Jun 2011 13:53 in reply to "RE[3]: Basically, awesome"
Neolander Member since:
2010-03-08

Well, in practice everyone already uses a subset of C++, I think. Some are into heavy templating, others get into more traditional inherited class hierarchies, and then there are those who use C++ like a better C with extra tricks like function overloading and a "bool" type...

Reply Parent Score: 1

RE[3]: Basically, awesome
by ebasconp on Wed 15th Jun 2011 15:14 in reply to "RE[2]: Basically, awesome"
ebasconp Member since:
2006-05-09

I too would like to see a much simplified C++ design, instead of even more features added with few things removed.


A lot of features have been added having simplicity as main feature; for example: "auto" and "range-based" for.

For example, to show all items in a vector, in current ISO C++ you need to do something like:

template <typename T>
void show(const vector<T>& v)
{
for (typename vector<T>::const_iterator i =
v.begin(); i != v.end(); i++)
cout << *i << endl;
}

In the new C++0x you can do also this stuff:

template <typename T>
void show(const vector<T>& v)
{
for (auto i = v.begin(); i != v.end(); i++)
cout << *i << endl;
}

or using the range-based loop:

template <typename T>
void show(const vector<T>& v)
{
for (auto& x : v)
cout << i << endl;
}

IMHO, simple, beautiful and powerful because they are new features, but they add simplicity too.

Reply Parent Score: 3

RE[4]: Basically, awesome
by Neolander on Wed 15th Jun 2011 15:33 in reply to "RE[3]: Basically, awesome"
Neolander Member since:
2010-03-08

While you can totally see it from this point of view, I see it myself at something which makes C++ compilers more difficult to implement, and as such probably less efficient in each individual area ;)

Reply Parent Score: 1

RE[4]: Basically, awesome
by Veto on Thu 16th Jun 2011 09:53 in reply to "RE[3]: Basically, awesome"
Veto Member since:
2010-11-13

for (auto i = v.begin(); i != v.end(); i++)


In the educative example above, you should really use ++i instead of i++. This may seem like nitpicking, but there is a significant performance difference. When using i++, the compiler will have to invoke the copy constructor at each iteration.

Reply Parent Score: 2