4 ms·
> Programs would be safer if the cultural prohibition against passing and returning structs was exterminated. The lack of a single, dominant, consistently high
by 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.