Live data from Hacker News

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

webhome.phy.duke.edu

31–40 of 155 posts

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

#31

Having spent the past decade working with python, I've always considered C to be a mystical black box for hardcore systems guys. I recently needed to write some high performance networking code so I decided to give it a shot. At first I found it painfully verbose and confusing, with the simplest operations requiring lines of code. After a couple days I found it to be rather refreshing, it encourages you to look at me…

If you liked it you should try a language with actual strict typing like Ada or Rust.

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

#32
post #9

Modern C++ is WAY better than C, IMO. I can never go back to C, having tasted C++14, and I work on embedded systems.

Seconded. I'd even go so far as saying that C++ is my favorite lang; it's C with the lavish furnishings of Java.

C is a space ship, Java is a plane, and C++ is an amphibious SSTO. It's messier in design and trickier to pilot, but you can do more with it!

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

#33

> There was this Oregon company - Mentor Graphics, I think they were called - really caught a cold trying to rewrite everything in C++ in about '90 or '91. I felt sorry for them really, but I thought people would learn from their mistakes. I've talked to some of the people at Mentor Graphics who were there during that period. The company basically went from #1 in the industry to #3 or so during the course of the C++…

> Inheritance chains were 5 or 10 classes deep. 30 years later, I still run into the same problem regularly. I'm not sure why, but this seems to be an anti-pattern that everyone needs to learn about the hard way.

I blame java

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

#35

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…

> The book "The Design and Evolution of C++" helps one understand why some things are the way they are and sometimes it helps understand why some things exist in the language in the first place.

I am not a C++ programmer, but I found that book extremely interesting and a pleasure to read. I think I have publicly said so before, but I wish there were books like this for more programming languages. There's a couple of fascinating HOPL talks on languages like Lisp and Lua, but due to brevity, they are not nearly as detailed and in-depth as this one.

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

#38
> C++ is more insidious -- because it IS a superset of C, it sucks you in, and (like Pascal) it has been embraced by computer science departments everywhere

I've heard of this, but does it happen?

I did my degree back in the '90s at Drexel, I don't recall there being any prescribed language... I did some systems stuff in C, some AI courses in LISP, a concurrency course in Java, some stuff I don't recall in Perl, some math courses used Maple, and there was a bit of shell and some familiarization with the Solaris boxes, etc.

I don't think I ever actually took a course on a specific language, you were just supposed to RTFM and figure it out.

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

#39
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.

To be fair I don't understand why anyone would bother. I am commenting on a forum, I don't expect to be given homework.

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

#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 ways to do a thing, and some of them are not recommended to be used at all. With C diverging in incompatible ways from C++, the backwards compatibility has made less sense than ever.
Post reply on HN