this post was submitted on 19 Mar 2024
1305 points (98.9% liked)
Programmer Humor
19589 readers
823 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
- Keep content in english
- No advertisements
- Posts must be related to programming or programmer topics
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
That's not what this operator does normally, and if you try to "shove" something into anything else (an int into a variable? a function into an object?) you'll get surprises... Basically it's "special" and nothing else in the language behaves like it. Learning hello world in C++ teaches you absolutely nothing useful about the language, because it doesn't generalize.
C, in contrast, has many instances of complex functions like printf (another commenter mentioned variable arguments), and learning to call a function is something very useful that generalizes well to the rest of the language. You also learn early enough that each different function has its own "user manual" of how to use it, but it's still just a function call.