• Scoopta@programming.dev
    link
    fedilink
    arrow-up
    2
    ·
    8 months ago

    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.

      • Scoopta@programming.dev
        link
        fedilink
        arrow-up
        1
        ·
        edit-2
        8 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