3 ms·
> C has a very weak type system, which is static. There's a lot of implicit conversion going on. Also the expressiveness of the type system is very limited (in
by gpderetta 7y ago
> C has a very weak type system, which is static. There's a lot of implicit conversion going on. Also the expressiveness of the type system is very limited (in C++ also).
It is true that the subset that C++ shares to C has too many implicit conversions, but you can do much better.
For example in C++ you can use enum class to define strongly typed integrals that do not implicitly convert to the basic types.
- carlmr 7y agoEnum classes are a good first step, but C++ is still very relaxed on integer and float conversions. I just wish I could use rust or ADA at work.