3 ms·
unions would be better if C had first class types. C would be safer if it had memory safe casts. C would be safer if we forced compilers to implement Walter B
by Gibbon1 3y ago
unions would be better if C had first class types.
C would be safer if it had memory safe casts.
C would be safer if we forced compilers to implement Walter Brights suggestion about array arguments.
C would be better if it had stdslice.h
Programs would be safer if the cultural prohibition against passing and returning structs was exterminated.
- kbolino 3y ago> Programs would be safer if the cultural prohibition against passing and returning structs was exterminated. The lack of a single, dominant, consistently high-quality C compiler likely caused this problem. As long as `int foo(struct{int x; int y})` doesn't optimize down to `int foo(int x, int y)` there are significant performance issues with struct passing. The return situation is especially problematic since C doesn't have multiple-valued return to begin with, so structs become a special case.