| ▲ | Panzerschrek 3 hours ago | |||||||||||||
> the mess in C++ is way worse What is mess in C++? Yes, it has some shady parts and is more complex than C, but this complexity provides expressiveness and type safety. And you can always use only features from C++ you find useful. > also contribute to projects that introduce C++ into a C code base, and I really wish they hadn't done this. What is problematic in these projects other than unfamiliarity of C++ for developers previously used only C? | ||||||||||||||
| ▲ | _gabe_ 2 hours ago | parent | next [-] | |||||||||||||
> What is mess in C++? Just a couple examples: How do you make a shallow copy of an object in C++, how do you do the same thing in C? Knowing I can just memcpy _any_ struct in C and have a valid shallow copy is pretty huge. How do you create a stable ABI in C++? How do you make one in C? In C, knowing that all my exported functions will mostly just work and be stable as long as I don’t change the interface is also huge and allows you to create cross language bindings pretty trivially. | ||||||||||||||
| ||||||||||||||
| ▲ | lelanthran 2 hours ago | parent | prev | next [-] | |||||||||||||
> And you can always use only features from C++ you find useful. Ah, the old "programmers just need to be more disciplined when using C++". Yeah, C programmers have never seen that argument before... | ||||||||||||||
| ▲ | uecker 2 hours ago | parent | prev [-] | |||||||||||||
My macro-vector types are type safe. In fact this is the point. I do not think C++ is more expressive or type safe. | ||||||||||||||