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.
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.