Live data from Hacker News

C++: Is It Really a Cruel Joke? (2003)

webhome.phy.duke.edu

51–60 of 155 posts

Re: C++: Is It Really a Cruel Joke? (2003)

#51
post #30

Dr. Stroustrup took a lot of pain to ensure the language was useful and did not break backward compatibility. He also always maintained that if you don't use a feature you shouldn't pay for it (in terms of performance). Eventually, it became even more popular and there is now a whole organisation behind the international standards for the language. The book "The Design and Evolution of C++" helps one understand why s…

I read that book around 1998 and was an instant convert. C++ has a steep learning curve, and does not stop you from getting yourself into a lot of trouble, but it does stand up to Bjarne’s original promise about performance. IMHO the STL is one of mankind’s greatest accomplishments.

C++ the language, maybe.

STL really is a cruel joke.

is it ok to mutate a data structure while an iterator to it is live? It depends, which makes it much less abstract and generic than it could be (and that people believe it is)

Error messages are useless. Compilers can and do (recently) help with that, but the main issue is the convoluted STL design in which every instantiation’s type name actually takes a full 80x25 screen to spell out.

STLs primary objects are individual iterated elements, which does abstract over pointers (as was stepanov’s intention) but are at such a low level of abstraction as to be onerous.

Modern C++ is slightly better.

Re: C++: Is It Really a Cruel Joke? (2003)

#52
post #45

I know C++ isn't really dying off, but what is the best platform-agnostic compiled object-orientated language these days? I liked Borland Pascal, and I know Delphi is kind of ticking along, but I'd rather invest in a language that is growing. Swift looks nice but still seems too Apple focused. Don't want to start a war, just open to some tips on the ecosystem..

If a GC or binary size is not a dealbreaker, Kotlin is hard to beat. Startup time fast when compiled to native.

Re: C++: Is It Really a Cruel Joke? (2003)

#53
post #45

I know C++ isn't really dying off, but what is the best platform-agnostic compiled object-orientated language these days? I liked Borland Pascal, and I know Delphi is kind of ticking along, but I'd rather invest in a language that is growing. Swift looks nice but still seems too Apple focused. Don't want to start a war, just open to some tips on the ecosystem..

Rust definitely is a good choice, if you can give up inheritance.

Wouldn’t classify Rust as OO though.

Re: C++: Is It Really a Cruel Joke? (2003)

#54
post #45

I know C++ isn't really dying off, but what is the best platform-agnostic compiled object-orientated language these days? I liked Borland Pascal, and I know Delphi is kind of ticking along, but I'd rather invest in a language that is growing. Swift looks nice but still seems too Apple focused. Don't want to start a war, just open to some tips on the ecosystem..

FreePascal, if someday get enough support could work.

Rust maybe. Swift have at least a valid alternative to move to other platforms:

http://elementscompiler.com/

I wish Apple get smarter and put swift for windows and better linux.

Re: C++: Is It Really a Cruel Joke? (2003)

#55

Dr. Stroustrup took a lot of pain to ensure the language was useful and did not break backward compatibility. He also always maintained that if you don't use a feature you shouldn't pay for it (in terms of performance). Eventually, it became even more popular and there is now a whole organisation behind the international standards for the language. The book "The Design and Evolution of C++" helps one understand why s…

[deleted]

Re: C++: Is It Really a Cruel Joke? (2003)

#56
post #15
post #8

Earlier quoted context omitted.

Funny how many people believe that language choice influences success. I guess they're all wrong? Sure, there are an uncountable number of other factors, but picking the wrong platform/language can be fatal.

Anytime I see someone bashing Java/PHP/JavaScript on /r/programmerhumor (reddit) I challenge them to a coding contest. I use the language they just bashed, they use their ideal language. No takers yet. I think, more often than not, language choice is like golf club choice. Different pros have their preferences, but a pro can play a good game with any set of clubs. A novice will blame the clubs for a poor game.

And you can perform carpentry using a big rock instead of a hammer. That doesn't negate any downsides of choosing the rock.

Re: C++: Is It Really a Cruel Joke? (2003)

#58
post #40

Dr. Stroustrup took a lot of pain to ensure the language was useful and did not break backward compatibility. He also always maintained that if you don't use a feature you shouldn't pay for it (in terms of performance). Eventually, it became even more popular and there is now a whole organisation behind the international standards for the language. The book "The Design and Evolution of C++" helps one understand why s…

If I had any real complaint about the execution of C++ it would probably just be the backwards compatibility with C. Don't get me wrong: I love C, and also I don't think it would've been possible for C++ to have gained so much relevance so fast had it not started as C with Classes. However, it does feel like a lot of kludges in C++ come from its legacy. Something that often confuses beginners is the sheer number of w…

If people wanted an object-orientated compiled language that didn't interlink with and offer a smooth transition from C, there were already alternatives (e.g. Modula).

Re: C++: Is It Really a Cruel Joke? (2003)

#59
post #2

I feel compelled to note that this page is from 2003-05-13, so I have no clue how much of its gripes are still valid in 'modern' C++ :)

Ya this is a whiny garbage post that looks like something I would have written when I was 18 had I been forced to use C++ for a school project (and probably could have been, given its year of publication). I'm not sure it adds anything to human discourse. It certainly isn't applicable to modern C++, or even the modern zeitgeist of pre-modern C++.

You can still do all those things in modern C++ in addition to all the stuff that get added every 4 years. The only thing that has improved dramatically is the tooling: compilers, static/dynamic analyzers.

> And, as I said before, every C++ programmer feels bound by some mystic promise to use every damn element of the language on every project.

Re: C++: Is It Really a Cruel Joke? (2003)

#60
post #49

"There are only two kinds of languages: the ones people complain about and the ones nobody uses." -- Bjarne Stroustrup [1] [1] http://www.stroustrup.com/bs_faq.html#really-say-that

While the OP article is indeed unhelpful and unconstructive, it's a pet peeve of mine to see people reference this quote (in the context of any language, not just C++) as a way of deflecting criticism. Not all languages that are used get complaints in equal proportion, and finding the constructive complaints is how we work towards making all languages gradually better.

> Not all languages that are used get complaints in equal proportion

It's because they are not used in equal proportion.

Post reply on HN