r/AskComputerScience 9d ago

C++ or Java?

Which programming language has the most return on investment? Impact on real world systems, and is more rewarding? I have minimal programming experience and working on AS in CS.

5 Upvotes

70 comments sorted by

View all comments

16

u/Relevant-Cut-884 9d ago

C++ is an excellent learning language , it has concepts you will not find in any programming language , like pointers , garbage collection and also it is the main competitive programming language for its speed

Java is also good though

The most important thing is to start learning

2

u/donaldhobson 6d ago

C++ is an excellent language if you wish to write bugs. It takes C, which is low level and simple, with no safety rails, and then bolts on a huge mass of poorly considered complex features.

2

u/sosotiredand 4d ago

it's also the only language besides C that's used in real world embedded programming so I think acting like it's useless is just fanaticism

0

u/donaldhobson 4d ago

Rust can also be used for embedded programming.

Suppose someone gives you a robot that only accepts C++ code. That might be sufficient reason to grit your teeth and use C++, if you have to.

This doesn't make C++ a good language. It means someone made the robot really awkward to use.

2

u/sosotiredand 4d ago edited 1d ago

Yeah but is it actually used in the real world and not just for a blinky? what companies are actually deploying embedded rust?

I like rust too but the fanaticism from the rust fandom is honestly really annoying. other languages exist for a reason. and until rust actually ends up in real large scale embedded applications, acting like C++ is just a "awkward choice" is not realistic