1068
C++ (lemmy.zip)
you are viewing a single comment's thread
view the rest of the comments
[-] porgamrer@programming.dev 0 points 6 months ago

The only conceivable way to avoid pointers in C is by using indices into arrays, which have the exact same set of problems that pointers do because array indexing and pointer dereferencing are the same thing. If anything array indexing is slightly worse, because the index doesn't carry a type.

Also you're ignoring a whole host of other problems in C. Most notably unions.

People say that "you only need to learn pointers", but that's not a real thing you can do. It's like saying it's easy to write correct brainfuck because the language spec is so small. The exact opposite is true.

[-] jas0n@lemmy.world 1 points 6 months ago

What's wrong with c unions? I've never heard that complaint.

this post was submitted on 08 Jun 2024
1068 points (98.5% liked)

Programmer Humor

19817 readers
432 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