C ProgrammingDiscussion
C++Ox


skrcoSep 10, 2007 1:34pm
What's your requirements/expectations for new C++ standard??
(or anything about C++0x ;-)


Sponsor
KibiyamaSep 10, 2007 2:01pm
It's basically C++ with Boost. Yippee.

Seriously, I think the people on the C++0x committee should be spending their time developing a higher-level successor to C++. Do we really need an add-on to a language that was already an add-on of a low-level language?

It's not right that you can manage threads, classes, and raw memory in the same language.


skrcoSep 10, 2007 3:17pm
Actually, I don't agree with your last sentence. At first, I'm definitely a big fan of modularity (so everything-in-one solution is for me passe), but applying this rule to everything I've ever met is a bit rash.
Raw memory management is sometimes helpful when you have written your own piece of code that is heavy dependant on objects with particular traits and classical memory management is not suitable for them (e.g. because of specialization on big-sized objects, etc.). And without use of raw memory you cannot write specialized neither any allocator.

Imho, "C++ with Boost" is quite a good image.

I would really appreciate something like break/continue with label (as in Java), when you set which loop you want to break. (Useful in situations with loop included in loop, and this in other loop, ...)

I want to know what do you think about the pointers in C++ at all (Not in technical and syntactical sense, but assuming pointer as a member of raw memory management included as a feature in C++ as a member of object oriented programming language and generic paradigm language, etc.)?


Sponsor
KibiyamaSep 10, 2007 3:43pm
Certainly C++ is a powerful language. I mean, that's its greatest asset. You can write a low-level system like a resource cache and then control it in a high-level API, all in the same language. It's great!

But all that power makes it easy to abuse and get yourself going down a bad path. And combined with how much boilerplate code it takes to do anything worth mentioning, C++ can be a nightmare.

To pose a metaphor, imagine you're running a restaurant. You can't be a manager, server, host, bartender, cook, janitor, busboy, and accountant.

You run a much better business if you're viewing everything at a single level. And at this point, languages should be able to at least take over the janitorial duties, yaknow? (pun here)

It should just take less effort to make the compiler do what I want it to do.

I like pointers. I like having explicit control over how an object is stored and passed around. And they make polymorphism possible. At the same time, though, there's a certain monotony about them. At any rate, I certainly wouldn't cry if I never had to use pointers again.

I don't mean to totally rip on C++. I love it, obviously, or I wouldn't be here. :D

So yeah, to sum it up: I don't agree with my sentence, either. It's fine to be able to do it in the same language, but you shouldn't have to jump hurdles like memory management just to reach your real goal. I mean, all you're really doing is satisfying the compiler, what's the point?


skrcoSep 10, 2007 5:05pm
As I've read your post, I stopped at the expression "satisfying the compiler", because I suddenly remember one article (maybe on kerneltrap.org; i think) dealing with synthetic removal of language expressions causing "unwanted" but "identifying the base idea of that piece of code" warnings and silly replacement of it with casted/changed expressions that compiler wouldn't complain about. ;-)

Yes, it is good and better (I'm according to some past experiences) when you are not managing everything, the same as you mentioned. Because it needs a much bigger mental burden, and then comes loss of control.
But on the other side it's really and really helpful when you can choose - again using analogy/example with memory allocator - one from thousands of memory allocators you found e.g. on the internet and include it in your function/object/whatever ;-)
And at this point, you don't need to take care of memory allocators and neither memory management. Actually you neither don't need to use pointers , references or any raw memory accessors in your program. It's all encapsulated in that particular library, where are overloaded some basic new/delete operators. And user of this library doesn't need to know whether these operators were overloaded, neither how the memory management works / is implemented.

But in fact, I agree with you now.


Sponsor
KibiyamaSep 20, 2007 12:22pm
Well, agreement is boring. :-\

I've heard a lot more about Qt recently, anyone fiddled with that?


C++Ox

You need to Sign-up for StumbleUpon to post to this forum