+ 2

Why do people are still using & learning C nowdays?

Why do people are still using C when we have C++11, 14, 17 and 20. C++ is C but with much more "security", i mean C++ has error handling while C isn't, for example casting in C++ we can use "static_cast", "reinterpret_cast" and whatever, meanwhile in C we just using "(type)", so obviously the C++ is much more secure and readable. In C++ you can write so easily and at the same speed of C, what i mean by that is you don't need to mess around with the heap with "malloc" and "calloc" you can simple use the "new" keyword, also lets not forget the "STL" ( vector, map, set etc.. ), and now in C++17 and C++20 they're making everything easier and better with std::any and std::variant etc... there is a lot to cover in C++ ( for instance, the power of compile time or friendships and inheritance ) while in C there are only bugs and unreadable code. Shouldn't universities focus more on C++ rather than C? ( Both have the same core). This question is just out of curiosity.

20th Sep 2018, 6:30 PM
Cain Eviatar
Cain Eviatar - avatar
4 Answers
20th Sep 2018, 6:52 PM
Ketan Lalcheta
Ketan Lalcheta - avatar
+ 5
That thread provided by Ketan Lalcheta contains some outdated answers (not surprising since it came from 2013, back when C++14 wasn't a thing), but it sums up pretty nicely that both languages excel in different situations and tasks. We have had similar questions asking about the relevance of C, if C is outdated or whatnot. The answer is a solid no.
21st Sep 2018, 4:02 AM
Hatsy Rei
Hatsy Rei - avatar
+ 1
Ketan Lalcheta lol, i searched for this but couldn't find any results. thanks!
20th Sep 2018, 6:54 PM
Cain Eviatar
Cain Eviatar - avatar
0
C is the "real deal" when it comes to systems programming and OS development
20th Sep 2018, 7:29 PM
Dlite
Dlite - avatar