|
|
|
|
|
by delta_p_delta_x
391 days ago
|
|
> only have a foggy idea how convenient working in modern C can be Here is a list of C++ features that C doesn't have, that are an immediate deal-breaker for me: - reference and move semantics
- templates, and type constraints with concepts
- namespaces
- `constexpr`, `consteval`, and other compile-time magic
- `auto` type deduction
- trailing return types
- RAII (can't believe I put this this late, but eh)
- a passable (although still not perfectly complete) standard library that blows the C standard library out of the water
- improved semantics that allow programmers to reason about the logic in code better, than obsess over pointer arithmetic
- built-in virtual functions, function pointer tables, etc
I can list more, but this is going to end up as a list of 'essentially every feature in C++ that isn't in C', which is the very reason for the former language to exist. |
|