Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Yes, many fail to understand that most C++ warts are caused by its C compatibility and are actually C issues.

Which incidentally also affect Objective-C for the same reasons.



Dear HN,

Is it really necessary to start another language war thread?

Sincerely, a happy C developer.


I am not starting a another language war.

Just stating the fact that when someone posts "C++ is horrible because of X", that X is either also available in "ANSI C", caused by compatibility with C semantics or compatibility with C toolchain.


How about this one: "C++ is horrible because of implicit copy constructors"? That one's not in C :-).

The newest additions to C++ for functional programming and automatic typing are quite intriguing. Blaming everything wrong with C++ on C is as disingenuous as labeling everything about C++ as wrong because one thing about it is wrong.


> How about this one: "C++ is horrible because of implicit copy constructors"? That one's not in C :-).

I also mentioned compatibility with C semantics.

"The Design and Evolution of C++" contains lots of such examples.


C doesn't implicitly convert one struct into another. Why implicitly convert one class into another just because I created a constructor in one class that takes the other class as a parameter? The "explicit" keyword should have been "implicit", with the default behavior reversed.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: