this post was submitted on 22 Mar 2024
120 points (90.5% liked)

Programmer Humor

19688 readers
125 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 1 year ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] Scoopta 39 points 8 months ago (13 children)

I really wish more projects would use .hpp to differentiate from C headers. It's really annoying to have a single header extension blend across two incompatible languages.

[–] [email protected] -3 points 7 months ago (2 children)
[–] Scoopta 3 points 7 months ago* (last edited 7 months ago)

It's actually not. Objective-C is a superset of C. C++ is not. It's MOSTLY compatible...but it's not a superset. See the restrict keyword, or the need for casting to and from void*, or the inability to name variables new or delete, or class, or this. I can't count how many C projects I have which use this as a variable name that WILL NOT compile as C++...or the need for extern C to call C ABI code...in no way is it a superset

EDIT: lol, you can downvote me if you want but I think you need to lookup what a superset is

load more comments (1 replies)
load more comments (11 replies)