|
|
|
|
|
by carlmr
2282 days ago
|
|
Static typing isn't really the only thing here. Strong typing would also be good. E.g. 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). OCaml, F#, Haskell and other functional candidates are strongly and statically typed, with very expressive type systems. Idris with it's dependent types would be ideal and goes even further than the above. In embedded most likely ADA and Rust offer strong enough static type systems. |
|
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.