Is C++ dead?

Pages: 12345
Feb 18, 2010 at 3:35pm
But, as a language, it will never win any beauty contest.


I don't think any Von Neumann lanuage can.
Feb 18, 2010 at 3:50pm
@incubbus,
Feel free :)

@kbw,
Assembly language is beautiful. It's beautiful in the same way as an upside-down painting: just because it's incomprehensible, doesn't mean it doesn't look nice.
Feb 18, 2010 at 4:04pm
@chrisname
Is this in the spirit of "beauty is in the eye of the beholder"?

I spent years writing assmbler code 20-30 years ago. You can make it look neat, impose structure on it and so, but it's hardly concise. The language offers absolutely no help, so because of that, I'd say it isn't a beautiful language.
Feb 18, 2010 at 4:20pm
I was joking really; but I do like some aspects of assembly. I feel in control. Actually, that's the same reason I gave for preferring C to C++... Lol, maybe I have some kind of inferiority complex: "The computer does what I tell it... I AM GOD!"
Feb 18, 2010 at 4:37pm
that's the same reason I gave for preferring C to C++
What can C do that C++ cannot?
C++ gives you more control than C: "The computer does what I tell it in the way I tell it"
Feb 18, 2010 at 4:47pm
What can C++ do that C can not?
I don't know why, I just prefer C. I don't like OOP. You might say "You don't have to use OOP," but then, I'd just be using C with a C++ compiler.

For some types of programs, I'd agree that C++ is better. Games, for example... I can see how OOP is useful for games; but it's not for me.
Feb 18, 2010 at 5:06pm
C++ isn't constrained to OOP. It's completely reasonable to use exclusively the procedure style.

For those who prefer C, don't you get fed up of the all the casting, declaring variables away from where they're used, no guaranteed intialisation/release, writing your own containers, ...
Feb 18, 2010 at 5:16pm
chrisname wrote:
What can C++ do that C can not?
C and C++ can do the same things. The difference is that C++ offers more ways to do the same thing.
Feb 18, 2010 at 5:32pm
chrisname wrote:
abstraction: the act of withdrawing or removing something
And pray tell: what exactly do namespaces and visibility remove?
Before you can answer: purely syntactical constructs that are compiled to nothing don't abstract anything.
Feb 18, 2010 at 5:42pm
But, as a language, it will never win any beauty contest.

Agreed.

Ever look around the IOCCC? Lots of fun there... :-)
Feb 18, 2010 at 5:52pm
what exactly do namespaces and visibility remove?

Well, maybe not namespaces, actually (they're just a way of stopping variable name conflicts, right? You can use static functions in C, but I guess it's easier to use namespaces); but things like protected and private should be obvious. What if I want to know what the value of a private variable is? Should I just use an "accessor function" that may or may not be provided? In C, as there's no private, protected, etc. variables can't hide.
Feb 18, 2010 at 6:05pm
That's not an abstraction, that's a restriction. Abstractions transform what's already there into something more manageable.

Variables: abstract memory locations by giving them names.
Operators: abstract computer instructions to easily remembered symbols.
Control structures: abstract frequently used series of instructions to easy-to-learn-and-remember structures.

Memory locations owned by a process are not inherently inaccessible. Visibility is a compiler-enforced restriction that an interface writer can use to prevent the user from accidentally screwing up internal state. It's not an abstraction because that restriction wasn't there originally.
Feb 18, 2010 at 6:21pm
Abstraction, restriction, either way; it's annoying. Anyway, I can see my argument is getting torn to pieces, so I'll admit that my argument is invalid; but at the same time, I'm still going to stick to C.
Feb 18, 2010 at 11:25pm
call me crazy but I find well written c++ code to be beautiful and elegant. Sure their are prettier languages out there, but c++ is at least a 6 in the look scale...With Luara Prepon as a red head being a 10 and this as a 1
http://static.funnyjunk.com/pictures/that_makes_me_moist.jpg

:P
Feb 18, 2010 at 11:43pm
http://static.funnyjunk.com/pictures/that_makes_me_moist.jpg
for some reason the link you posted kept taking me to the logo.
Feb 19, 2010 at 12:00am
weird, just google "that makes me moist" and look for the elderly woman with brown hair.
Feb 19, 2010 at 1:09am
Something that drives me insane with C++ is that it requires curly braces with try..catch clauses. This is at odds with all other control constructs in the language (except functions).

It usually doesn't bother me, but occasionally you only need something simple like:
1
2
3
4
5
6
7
8
  try
    switch (fooey)
      {
      case bar: ...
      case baz: ...
      default: ...
      }
  catch (zippo z) complain( z );

I know it isn't really a big deal, but it drives me nuts.
1
2
  do nothing();
  while (true);

(For your reference, nothing() is coded as:
1
2
3
4
5
6
7
void nothing()
  {
  string s;
  cout << "Had enough yet? " << flush;
  getline( cin, s );
  if (toupper( s[ 0 ] ) == 'Y') exit( 0 );
  }
)
Feb 19, 2010 at 3:32am
I think every programming language can produce neat code and horrible code. It depends on the writer and the reader. Like kbw said, "beauty is in the eye of the beholder." I think the GNU indentation style is incomprehensible. They'd probably say the same about my code, I guess (even though looking at my code is like listening to Mozart: you get overcome by the beauty of it).
Feb 27, 2010 at 8:05pm
there are many java haters in the world, i use it to program cellphone apps..

i wonder why some people hate java yet they like C#, C# is almost a copy of java..

maybe the letter 'C' is just that attractive..
Mar 1, 2010 at 5:34pm
closed account (S6k9GNh0)
They don't as far as I know.

Java is useful for somethings but it's overused as well as C#. When you create a backend for something that needs to be optimal, you don't go and write it in friggin' Java or C#.

For instance, you may want to use Perl to parse and handle files because of its ease of use. But its not efficient enough to make a game engine in (or is it even possible..?). Java doesn't fit into this category. You may want to use Java for cross-platform abilities? You may want to use Java for its managed programming? I personally feel that the downside of large resource usage and the use of a third party application which is required to be installed is too great to have these features truly be an advantage. I don't know about C#, I've only looked at it, I don't know how it really works. I don't appreciate the use of the .NET framework either.
Last edited on Mar 1, 2010 at 6:05pm
Pages: 12345