this post was submitted on 19 Mar 2024
1309 points (98.9% liked)

Programmer Humor

26354 readers
920 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 2 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 6 points 2 years ago (16 children)

C++ is still the far and ahead leader in game programming. All the tools are written in it and everyone is used to it.

[–] Sonotsugipaa 16 points 2 years ago (15 children)

C++ is an awful candidate for a first programming language to learn, at least nowadays - it is very powerful, but it's also full of foot-guns and past a certain point the learning curve becomes a wall

[–] [email protected] -4 points 2 years ago (3 children)

Not really. Pointers are almost always a bad idea - just use const refs and you'll be fine.

[–] Sonotsugipaa 4 points 2 years ago (1 children)

If using pointers is out of the question, then why choose to learn a language with explicit memory access before anything else?

I have yet to learn Rust, but from what I hear it's simpler and (mostly?) memory-safe – implying that it's generally a better first language to learn.

[–] [email protected] 1 points 2 years ago

Pointers are almost always a bad idea - but you'll probably get a lot of mileage out of having a handful of them in a large project... there's an impulse with new C++ devs to do everything with pointers and use complex pointer arithmetic to do weird array offset and abuse predictable layouts to access stack variables etc.... pointers are fine when used with moderation.

load more comments (1 replies)
load more comments (12 replies)
load more comments (12 replies)