3 ms·
You can learn C in a few days. It takes 10 years to learn C++. My experience, anyway.
by WalterBright 4y ago
You can learn C in a few days. It takes 10 years to learn C++. My experience, anyway.
- zabzonk 4y agoi respect your opinion, but for example you can do some very common tasks using std::string that will be really difficult in c. and much of programming is dealing with strings. speaking as a c and c++ trainer here.
- cozzyd 4y agoThe lazy way to do things with strings in C is almost always asprintf
- bitwize 4y agoMy experience is you can get to where you think you know C in a few days. But it may take decades to become aware of all its footguns, and much more time to learn how to program C in a way that avoids them -- if that can be done by humans at all. (Maybe our new AI overlords will figure it out.) Nuke the site from orbit. It's the only way to be sure. Deprecate C for all greenfield development, and launch a big-science push to rewrite all the extant load-bearing C code in something else with safety guarantees (Rust=good, SPARK=better). If null pointers were a billion dollar mistake, then letting C become ubiquitous was a mistake that runs in the trillions.
- elteto 4y agoIf this was even remotely true we wouldn’t be living in a world full of kernel exploits and broken software, with a lot of it written in C. Writing C code is hard.
- WalterBright 4y ago> Writing C code is hard I found it very easy. I was writing production C code in a few days. (Of course, I was an experienced asm programmer before that, and C was a natural.) I write code very differently today. But that's not learning C, it's learning technique.