C++'s type system is both more consistent and more expressive.
GC'd languages fall into roughly 2 categories.
1. those that are pure but lack strong primitives (Python, Ruby, et al),
2. those that bifurcate their type system and treat primitives as a special case (Java, C#, et al).
2 is done as a compromise for performance since they'll start making guarantees such as preferring stack allocation. This is the primary difference between 1 & 2, what the language promises with these types (if they have them).
C# learned from Java but added "value types". So now understanding what a piece of code actually does requires you to know not just the type, but whether it's a value or reference. Create a tuple with a string and 2 ints and default construct it. You get (null, 0, 0). Now do it with MyTypeA, MyTypeB, and MyTypeC. You have no idea what that tuple will default construct to unless you know more about MyTypeA, MyTypeB, and MyTypeC.
Default equality is it's own bag of worms.
Whereas in C++ it's a lot simpler. It's value, a reference, or a pointer, and you know which it is by looking at the callsite. C++ has similar ambiguity with respect to function callsites with references vs pointers, but the convention in the C++ community is to pass by pointer if it's going to be mutated and by const reference if it is not.
IOW, the rules for the C++ type system are easier to learn and use effectively, and their semantics are easier to understand from the code.
The existence of typedef automatically makes it more expressive than C#.
Fair points. I agree that having to memorize which types are arbitrarily treated as pointers in Python is a huge pain. Python also adds pain with the "default argument" issue.
GC'd languages fall into roughly 2 categories.
1. those that are pure but lack strong primitives (Python, Ruby, et al), 2. those that bifurcate their type system and treat primitives as a special case (Java, C#, et al).
2 is done as a compromise for performance since they'll start making guarantees such as preferring stack allocation. This is the primary difference between 1 & 2, what the language promises with these types (if they have them).
C# learned from Java but added "value types". So now understanding what a piece of code actually does requires you to know not just the type, but whether it's a value or reference. Create a tuple with a string and 2 ints and default construct it. You get (null, 0, 0). Now do it with MyTypeA, MyTypeB, and MyTypeC. You have no idea what that tuple will default construct to unless you know more about MyTypeA, MyTypeB, and MyTypeC.
Default equality is it's own bag of worms.
Whereas in C++ it's a lot simpler. It's value, a reference, or a pointer, and you know which it is by looking at the callsite. C++ has similar ambiguity with respect to function callsites with references vs pointers, but the convention in the C++ community is to pass by pointer if it's going to be mutated and by const reference if it is not.
IOW, the rules for the C++ type system are easier to learn and use effectively, and their semantics are easier to understand from the code.
The existence of typedef automatically makes it more expressive than C#.