this post was submitted on 28 Nov 2023
560 points (97.6% liked)

Programmer Humor

32018 readers
1060 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] Mozingo@lemmy.world 11 points 9 months ago (1 children)

But neither c++ or Java have typeof

[–] 257m@sh.itjust.works 0 points 9 months ago* (last edited 9 months ago) (1 children)

C has typeof. Why wouldn't C++?

Edit: Just checked and it doesn't. Why is C++ such a stupid language. That whole superset of C BS and they pull this off?

[–] sgh@lemmy.ml 2 points 9 months ago* (last edited 9 months ago)

Standard C does not have typeof. That's just a compiler extension...

Also the equivalent of typeof is most likely decltype or auto.