3 ms·
> 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
by dllthomas 9y ago
> 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.