TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Ask HN: Is C++ a better language than C?

6 pointsby atlacatl_svover 4 years ago
please refer to original question and discussion for better context: https://twitter.com/brouhaha/status/1340919013929529344?s=21

7 comments

gradschoolover 4 years ago
The advantages of C++ over C that account for its popularity boil down to three main things.<p>1. It&#x27;s easier for managers to hire C++ programmers because there are more of them than C programmers.<p>2. C is designed to trust the programmer more than C++ is. In some organizations, this difference might be advantageous for containing the damage caused by the dumbest team member.<p>3. It&#x27;s easier for a developer to appear productive to a manager using C++, especially a non-technical manager, because it requires writing a lot of boilerplate.
AnimalMuppetover 4 years ago
If what you&#x27;re after is simplicity, then no, C++ is not better than C. If that&#x27;s what you&#x27;re after, look at Go instead.<p>But I question the premise. C++ is a more complicated language, which lets you do certain things much more simply than you could in C. (It also lets you make bigger messes.) If you care about doing those kinds of things, then C++ lets <i>your</i> code be simpler, even if the <i>language</i> is more complex.<p>As always, use only the parts you need, and learn enough about them to use them well.
lmedinasover 4 years ago
I guess so, that&#x27;s why its so popular. Despise of what some people say about it, it tries to make better for all C flaws and introduces modern features to bring continuity to the language.
pasttense01over 4 years ago
It depends on where and how you want to use the language.
评论 #25504971 未加载
rangoon626over 4 years ago
It makes string handling much easier, that’s for sure.<p>However I always liked the way Objective C did OPP vs how C++ did it.
评论 #25507058 未加载
krappover 4 years ago
Yes. Function and operator overloading, default arguments and templates alone make it better.
umenover 4 years ago
Linus Torvalds don&#x27;t thinks so
评论 #25503077 未加载