View Single Post
Old 04-03-2003, 03:43 PM   #51
Yui Unifex
Senior Member
 
Join Date: Apr 2002
Location: Florida
Posts: 323
Yui Unifex is on a distinguished road
Send a message via ICQ to Yui Unifex Send a message via AIM to Yui Unifex
Question

What case is that? If it's the one where I stated that C++ is cleaner than C for some purposes (and to which you agreed), then that's already been proven. I am simply discussing what considerations the language designers were bound to over and above the features you describe. But you're missing an important point (and oddly enough, one that you quoted):
I don't think the language designers were all sitting around a table thinking about designing a totally new language when suddenly one of them had the brilliant idea to base it off C. No, it evolved from C; rather than itself being a separate entity. So no, I don't "justify this way", I'm simply telling you how things probably were back then. Now you should understand that C++ isn't the way it is just because it wanted to be popular, but because it wanted to supplement C.

That's fine. Just be aware that 'actual merits' for some people include backwards compatibility with their previous codebases and ways of doing things.

You mean syntactic ugliness like:
[code] /* C version */
char *build_magic_string (...) {
static char magic[256];
...
return magic;
}[/quote]
As opposed to:
[code] // C++ version
string build_magic_string (...) {
string magic;
...
return magic;
}[/quote]
And all that reduced range of debugging tools, like the exact same debugger and tools they were using before? Yeah. You got me there.

The lack of forced object-oriented design is an incredible plus when you simply want to take advantage of one or two features but also want your codebase to use the same idioms and design as before. Many C++ codebases use procedural C code, and this is a very good thing for programmers, because they have to do a minimal amount of porting. If you're suggesting that to take advantage of a few useful features, a programmer should have to refactor and redesign his codebase, you're crazier than I thought you were.
Yui Unifex is offline   Reply With Quote