r/AskComputerScience • • Aug 26 '19

Future of C/C++?

I am a student majoring CS and I heard a lot of comments that C/C++ is useless in the real field on internet or from someone who I know personally. (although school teaches C C++ Java Python and this courses are mandatory)

I am the heavy user(?) of C/C++ , and I liked it because of the features that can manage memory directly and fast and ability to control over low level system.

I also searched what kind of thing in the "field" is built by C/C++ and I found a lot of them.

For example, TensorFlow, Node.js, Firefox(mostly C), OpenCV, and many others which are famous AND huge project.

So, I am really confused. Why I fell in love with C/C++ is that actually I am really interested in what happened exactly backside of applications, how actually network communications established, processes are managed and so on. But many many people, especially on the internet keeps saying that JavaScript or Python is the best and C/C++ is suck.

Give me your idea on the claim that C/C++ is on its decline.

42 Upvotes

32 comments sorted by

View all comments

9

u/earlyryn Aug 26 '19

I've heard the oposite from people who teach people high load computing in mail and cloud company, so your friend should get his facts checked

2

u/Ricky771 Aug 26 '19

what exactly those people said??

5

u/Sqeaky Aug 26 '19

I can't speak for those people, but there is a common pattern in business that leverages multiple languages where they ate strongest.

Let's lump Ruby, Python, Php, and Js together and C, C++, Go, Java, and Rust. The group is fast to develop in and slow to run. The second group can be slow to develop in and fast to run.

Many people and business build their first iteration in Ruby (Twitter), Php (Facebook), or some other scripting language where the type system is loose and gets out of the way so development can proceed quickly. Then when hardware gets expensive, the product is done re-inventing itself, and obviously slow parts show themselves then the system can be rewritten in a faster language.

Twitter resisted this and just tried to fix ruby, going so far as to create their own hyper optimized version of the language. In the end this helped a little but they didn't stop serving fail whales until they just gave in and started writing c modules for their hot paths which fixed their issues rapidly.

This strategy allows business to iterate rapidly and throw away code for bad ideas at low cost, but eventually high performance and lower hardware cost once they have a proven strategy and product. This strategy comes at the cost of at least one guaranteed rewrite but tries to maximize short term chances of success at each stage.

1

u/earlyryn Aug 26 '19

for the highest load services they use c++ and recently started adopting go, big in CES companies like mail. ru and badoo, they stating it on their talks on youtube, also there are online courses on highload.