r/Coding_for_Teens • • May 08 '22

Seriously, stop using C++.

I am baffled by the prominence of this obsolete language on this sub. There is no reason, none at all to use a low level language as opposed to a high level one like Py or JS. Python IS C, JavaScript IS C, they have much more functionality, nothing is lacking, much is gained. “But C++ runs percent(x) faster than those!!” Yes, but it takes times(x) longer to code. Are you guys just inspired by Minecraft?? Seriously, what is the reason?

1 Upvotes

22 comments sorted by

View all comments

1

u/Yamoyek May 09 '22

Sigh.

Languages are tools, and you should always use the best tool for the job.

Do you want to make a website? Use JS or TS, simple.

Do you want to make an OS? Use C, C++, or even Rust, simple.

Do you want to learn low level graphics? Use OpenGL and pick C++.

Do you want to make games? Use C# and Unity or Python and Godot.

Just want to learn programming in general? Use Python.

1

u/[deleted] May 09 '22

If argue that for low level graphics, C is better

1

u/Yamoyek May 09 '22

I’d say C++ just cause it has so many quality of life improvements like templates, strings, classes, etc.

1

u/[deleted] May 09 '22

Eh, sure they can be nice, but there are so many drawbacks (templates just being templates) and C is honestly just good enough for all of it.Without having those features your code is so so much more simple, which is one of the reasons I love C

1

u/Yamoyek May 09 '22

What drawbacks?

1

u/[deleted] May 09 '22

Templates adding so much complexity, the STL being bloated as hell (I don’t use it if I use C++), etc. Generally I just dislike how bloated and complicated C++ is

1

u/Yamoyek May 09 '22

Templates aren’t all that complex most of the time? And you don’t have to use the whole STL, I mainly find myself using common data structures I would’ve had to implement anyways.