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.

Learning Standard C++ as a New Language (1999)

64 pointsby pcr910303about 3 years ago

9 comments

gattrabout 3 years ago
Somewhat related: [1]. A bit provocative title, but it&#x27;s actually about &quot;teaching (the newcomers) C++ constructs first before going through C-era ones&quot;.<p>[1] CppCon 2015: Kate Gregory “Stop Teaching C&quot; (<a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=YnWhqhNdYyk" rel="nofollow">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=YnWhqhNdYyk</a>)
评论 #30647417 未加载
synergy20about 3 years ago
C++ still mixes with lots of C code especially in the system programming field, i.e. C++ has to use many Posix C calls, C++ does not have its own socket() API replacement for network programming, even C++ thread uses pthread underneath, etc.<p>Unlike other languages, C++ needs quite some C code to get the whole thing working sometimes. I do agree that when you learn C++, you should not focus on its C roots.
评论 #30645357 未加载
评论 #30644578 未加载
评论 #30646506 未加载
评论 #30646933 未加载
not2babout 3 years ago
This is from 1999 and should not be recommended today, as C++11 was such a huge improvement over C++98&#x2F;C++03.
评论 #30645840 未加载
评论 #30646830 未加载
hzhou321about 3 years ago
[Disclaimer: I only read the first part.] Let&#x27;s say we include in the C standard library a routine, `const char *scan_str(int fd)`, one only need to remember to free the returned string once finished with it. Or we can even get away by using static buffers. All the safety and practical requirement are merely implementation details that &quot;user&quot; needn&#x27;t care (unless they are the implementor). It appears to me that most of the complexity argument in the article is on the availability of library routines, plus, there is a shift of roles from implementor to user -- we all wear different hats from time to time. The article was from 1999, but similar arguments are still popular today or even more so, that using convenience of library availability as strength in language. A rich standard library plus some implicit notations to using the standard library may have its appeal to some users. For some other, who understands the possibility of million ways of implementing a function and the importance of understanding subtleties, C++ is really too complex to use.
TazeTSchnitzelabout 3 years ago
I think using std::string and so on from the get-go may be sensible if C++ is the language being used for an introduction to programming, in order to not get mired in difficult details. The great complexity of the language stemming from its history makes it not a great language for beginners, though!<p>On the other hand, if you are trying to teach C++ to people who already know how to program, then you want them to be able to understand existing C++ code, not just write new code. So they need to understand the complex parts of the language and why they are like that, and the easiest way to do that is to start where C++ started, i.e. with C.
评论 #30645397 未加载
评论 #30643816 未加载
turndownabout 3 years ago
Interesting article; C++ as “C and then some” was clearly an irresistible marketing term for many of the programmers from that time that I’m sure Bjarne indulged himself in saying once or twice too.
pieterrabout 3 years ago
[1999]
评论 #30643119 未加载
评论 #30644657 未加载
cptrootabout 3 years ago
Doesn&#x27;t this need a (1999) at the end? This is from before C++11.
评论 #30644654 未加载
pipeline_peakabout 3 years ago
.
评论 #30645431 未加载