Re:Convincing C programmers to switch to C++: A look at huma...
by dllthomas on Friday June 02, 2017 @11:59PM
(#14474939)
> because types are so weak in C
You can get nominal typing in C by wrapping your primitives in single-element structs. Slight syntactic overhead, no runtime overhead. In my C code, I try to avoid passing primitives between functions. It worked out well on my last large C project.
Disclaimer: I don't love C++, I think it has lots of problems, but saying C++ is wrong, while C is right suggests to me that lots of people didn't take time to actually learn C++ but have strong opinions on it.