Live data from Hacker News

Surviving C++

c0de517e.blogspot.com

1–10 of 25 posts

Re: Surviving C++

#2
I really don't see the point of the tone the article adopts. If it is aimed at C++ users, badly mouthing C++ can only put them off what could be useful advice. If it is aimed at C++ bashers, they don't need the C++ advice anyway.

Re: Surviving C++

#3
post #2

I really don't see the point of the tone the article adopts. If it is aimed at C++ users, badly mouthing C++ can only put them off what could be useful advice. If it is aimed at C++ bashers, they don't need the C++ advice anyway.

Sounds like you think that only people who don't use C++ have negative feelings about it. I wouldn't agree with that.

Re: Surviving C++

#4
post #2

I really don't see the point of the tone the article adopts. If it is aimed at C++ users, badly mouthing C++ can only put them off what could be useful advice. If it is aimed at C++ bashers, they don't need the C++ advice anyway.

Bad mouthing of C++ has become a popular thing to do lately. I think it's partly because C++ is a difficult and time consuming language to learn with many caveats, and people find it easier to give up and bash it instead.

Just because C++ doesn't feel as "clean" as other languages doesn't mean it's not incredibly powerful, widely supported, and a fun language to develop in. To all the haters out there - give it a chance!

Re: Surviving C++

#5
post #4
post #2

I really don't see the point of the tone the article adopts. If it is aimed at C++ users, badly mouthing C++ can only put them off what could be useful advice. If it is aimed at C++ bashers, they don't need the C++ advice anyway.

Bad mouthing of C++ has become a popular thing to do lately. I think it's partly because C++ is a difficult and time consuming language to learn with many caveats, and people find it easier to give up and bash it instead. Just because C++ doesn't feel as "clean" as other languages doesn't mean it's not incredibly powerful, widely supported, and a fun language to develop in. To all the haters out there - give it a cha…

> Bad mouthing of C++ has become a popular thing to do lately.

Noticing this and rushing to C++'s defense has become a popular thing to do lately. I wonder why.

Myself, I merely have one comment: Bjarne Stroustrup has been known to criticize C++.

Re: Surviving C++

#6
post #5
post #4

Earlier quoted context omitted.

Bad mouthing of C++ has become a popular thing to do lately. I think it's partly because C++ is a difficult and time consuming language to learn with many caveats, and people find it easier to give up and bash it instead. Just because C++ doesn't feel as "clean" as other languages doesn't mean it's not incredibly powerful, widely supported, and a fun language to develop in. To all the haters out there - give it a cha…

> Bad mouthing of C++ has become a popular thing to do lately. Noticing this and rushing to C++'s defense has become a popular thing to do lately. I wonder why. Myself, I merely have one comment: Bjarne Stroustrup has been known to criticize C++.

Really? I haven't seen many people rushing to defend it at all, just a whole lot of "C++ sucks, let's all stick with C".

I should hope Stroustrup has been known to criticize it! It wouldn't be a very good language if it was designed by someone who couldn't spot flaws in his own work. By no means is C++ a perfect language, and everyone knows that. I'm just saying that doesn't make it any less usable or worth learning.

Re: Surviving C++

#7
"...Otherwise, the class has to have some data associated with it. Are we sure we want to link Foo both to the interface of Bar and to its in memory layout?

No, you are not. Don't do it, use composition instead. [More Effective C++, 33 Make non-leaf classes abstract]"

Sigh. Dude either didn't read the book, or didn't think about what it's saying; he's just quoting the chapter headings and drawing a silly conclusion. Abstract classes can most definitely have data in them, and Meyers is not saying that you should restrict yourself to object composition (he has a whole section on how and when to use inheritance in the first book!)

The point Meyers was making is that if you're allowed to instantiate a base class that implements an assignment operator, you can easily get into a place where you can do bad, mixed-type assignments. If you make your base classes abstract, you can prevent this problem -- hence the chapter title.

This isn't the only bit of bad advice in this blog post -- just one that I picked out at random. It's another example of a rant by someone who knows just enough about C++ to be dangerous, but not enough to be insightful. Flagged.

Re: Surviving C++

#8
post #4
post #2

I really don't see the point of the tone the article adopts. If it is aimed at C++ users, badly mouthing C++ can only put them off what could be useful advice. If it is aimed at C++ bashers, they don't need the C++ advice anyway.

Bad mouthing of C++ has become a popular thing to do lately. I think it's partly because C++ is a difficult and time consuming language to learn with many caveats, and people find it easier to give up and bash it instead. Just because C++ doesn't feel as "clean" as other languages doesn't mean it's not incredibly powerful, widely supported, and a fun language to develop in. To all the haters out there - give it a cha…

But the main reason it's not as clean is because it has had to maintain backwards compatibility with C, which is 40 years old now.

Ironically, had C++ been 'cleaner' and not as backwards compatible with C from the outset, then we probably would not be having this conversation today because no one would have ever adopted it. :)

Re: Surviving C++

#9
post #2

I really don't see the point of the tone the article adopts. If it is aimed at C++ users, badly mouthing C++ can only put them off what could be useful advice. If it is aimed at C++ bashers, they don't need the C++ advice anyway.

You assume the intersection of the sets of people who use C++ and of people who dislike C++ is empty. I have used C++ for some projects and don't exactly love it. I don't love Java, PHP and Ruby either, but I can use them.
Post reply on HN