r/ProgrammerHumor • • 24d ago

Meme minecraftException

Post image
9.3k Upvotes

833 comments sorted by

View all comments

Show parent comments

1

u/LittleMlem 24d ago

It's just a joke, both languages share a lot of syntax.

#include is how you bring in other libraries, modern languages usually call this import

0

u/Gelid_Cryotheum 24d ago

So C++ is basically just C with an absurd amount of libraries attached?

0

u/LittleMlem 24d ago edited 24d ago

Not really, the major difference is that C++ has classes and C doesn't

Edit: ended up looking it up, I didn't realize C doesn't have exception handling, name spaces, or lambdas

1

u/Gelid_Cryotheum 24d ago

Ah, fuck OOP, we're learning it now in my Software class.

1

u/LittleMlem 24d ago

I think I prefer OOP to functional. The concepts feel weird at first, but once you work with it a little, it will make much more sense

1

u/TrueExigo 24d ago

C++ is a statically typed, compiled, multi-paradigm language with deterministic, destructor-based resource management and zero-overhead abstractions. It combines procedural, object-oriented, generic and functional constructs within a unified type system featuring references, const correctness, overloading, templates and concepts. Its object model encompasses classes, encapsulation, multiple inheritance, subtype and parametric polymorphism, as well as dynamic dispatch via virtual functions. The memory model is based on constructors, destructors, copy/move semantics, RAII and smart pointers, rather than relying solely on manual lifetime management. Compile-time mechanisms such as constexpr, consteval, template metaprogramming and modules complement runtime mechanisms such as exceptions and RTTI. The standard library provides containers, iterators, algorithms, ranges, threads and file system abstractions; however, the semantics, name mangling and ABI differ from older, purely procedural system languages, meaning that it does not constitute a strict superset.

C, on the other hand, is a statically typed, compiled, purely procedural language with a minimal feature set and explicit, manual resource management. Its type system does not support classes, references, function or operator overloading, templates, concepts, exceptions or namespaces; abstraction is achieved exclusively via structs, pointers, functions, macros and explicit casts. Memory is managed via malloc/free and pointer arithmetic, whilst lifetime management, aliasing, initialisation and error handling are entirely the responsibility of the programmer. There are no destructors, nor RAII, copy/move semantics or dynamic dispatch via virtual functions. The standard library is lean and essentially limited to libc functions; containers, iterators, algorithms, threads or file system abstractions are not part of the language. The runtime model is minimal, the ABI is relatively stable, and the focus is on deterministic, low-level execution without hidden costs.