Live data from Hacker News

Popular Myths about C++, Part 3

isocpp.org

111–114 of 114 posts

Re: Popular Myths about C++, Part 3

#111

Earlier quoted context omitted.

>I think I didn't explain myself, but something that basic in these days should be on the standard library in my opinion. Ok well you hop in your delorian and go back to 1970 and let them know. In the mean time, how does that in any way make C not capable for the same tasks as C++? >I don't think C is simple at all Then you don't know C. The entire point of C is that it is simple. >Its syntax can be really cumbersome…

>Ok well you hop in your delorian and go back to 1970 and let them know. Well they could have added in C99 or more recently in C11. What's wrong about updating a language? > In the mean time, how does that in any way make C not capable for the same tasks as C++? I would rather prefer not reinventing the wheel and a language that actually ship with it. > Then you don't know C. The entire point of C is that it is simpl…

>What's wrong about updating a language?

Nothing, they do update the language. But fundamentally changing the language to be completely different is not the same as adding some small thing. C is simple on purpose. Adding complexity is not just an update, it is making it no longer suitable for its intended goal. So they choose not to.

>I would rather prefer not reinventing the wheel and a language that actually ship with it.

You don't have to reinvent the wheel, use a library like you already said.

>I think your definition of simple is very different of mine

Clearly. But mine is the same as 90% of the people who have commented on the subject. People overwhelmingly describe C as simple.

>Scheme is simple

Yes it is. As is C.

>How come something cumbersome has nothing to do with simplicity?

You just quoted how. Are you joking?

>Also I am not saying that C++ is simple

But you are arguing that C is complex and thus not appropriate, while C++ is appropriate. You can't have it both ways.

>Yes, I have used both in my formal job, and I can avoid memory leaks and memory corruption easily on C++

Which has what to do with debugging? And why are you incapable of avoiding those problems easily with C when everyone else does it just fine?

>Not the case on C, specially when working in medium size teams where always people forget what they should cast a void* into and why they should not.

Yes, clearly there's no way groups of people could work together on large complex software in C. I'll go tell linux, apache, X, all 4 BSDs, nginx, postgresql, postfix, etc, etc, etc that they don't exist. I'm sure they'll be glad to know.

>Well Scheme is a good example of language that is order of magnitudes simpler than C and it is not prone to memory leaks nor memory corruptions

Scheme is not even one order of magnitude simpler than C. Go read the specs. And scheme is not prone to memory leaks and "corruption" because it is higher level. This also makes it much slower. Even more importantly, it makes it a ridiculous comparison.

>If by simple you mean simpler than C++, yeah.

You are the one advocating C++ over C while claiming C is too complex. What are you blaming me for?

Re: Popular Myths about C++, Part 3

#112
post #66
post #50

Earlier quoted context omitted.

"And C++ isn't just for large, complicated programs; it's for small, complicated programs too." hahahahahahaha!!!!!!!!!!!!!!!!!!! -- I was thinking that, but hadn't put it into those exact words yet. I was thinking something like "C++ is definitely for complicated programs" -- not that they necessarily need to be complicated, but that C++ often unnecessarily complicates them. I really wanted to like the STL a long ti…

I want to explain why you are getting down-voted: Hacker News don't like onomatopoeias like “hahahahahahaha!!!!!!!!!!!!!!!!!!!”. In general, a neutral tone is preferred and tongue-in-cheek is acceptable (like parent). This is an important difference with most subreddits (some, like /r/AskHistorian have a similar ambiance); it avoids ending up with long, heated and shallow conversations.

I'm not exactly new here. I figured some might not like the "hahaha...", but I don't really care. That's exactly what I did when I read the parent comment.

I didn't just leave it at the onomatopoeia -- I made a very reasonable comment afterwards.

Re: Popular Myths about C++, Part 3

#113
post #50

Earlier quoted context omitted.

"And C++ isn't just for large, complicated programs; it's for small, complicated programs too." hahahahahahaha!!!!!!!!!!!!!!!!!!! -- I was thinking that, but hadn't put it into those exact words yet. I was thinking something like "C++ is definitely for complicated programs" -- not that they necessarily need to be complicated, but that C++ often unnecessarily complicates them. I really wanted to like the STL a long ti…

>"I was thinking something like "C++ is definitely for complicated programs" I am not sure which language are you comparing it to but there is definitely a subset of C++ that is easy to use, very readable and type safe. My only problem with C++ is somebody else code, because there is also a terrible subset of C++ where things can turn very hairy. But same can be said about C, and actually C sometimes encourage you to…

Yes, and I am fully aware of reasonable subsets of C++.

However, there are multiple other languages that I would rather program in -- although there are still places where I would chose to use C or C++.

I was mostly disappointed that when I tried to use many of the features of C++ that were beyond an intermediate level, the real warts of the language made it not worth the hassle.

I suspect some of that has improved in the latest version of the language spec (and some in the version prior), but I haven't seen anything so far that has excited me enough to get back into it much.

Re: Popular Myths about C++, Part 3

#114
post #80

Earlier quoted context omitted.

In the case of git, C++ was actually evaluated (in a manner very natural to Linus) and not discarded due to some habit: http://harmful.cat-v.org/software/c++/linus

> I've come to the conclusion that any programmer that would prefer the project to be in C++ over C is likely a programmer that I really would prefer to piss off, so that he doesn't come and screw up any project I'm involved with. Quintessential Linus, but I wouldn't call this an "evaluation"... :)

Fair enough.

As a side note: I think we as a community should promote the catchphrase "You've Been Torvalds'd".

Post reply on HN