2 ms·
> what are we supposed to do if you are not allowed to both use goto or have multiple returns in a function (in C) Move jobs. But seriously this is a good poi
by zarzavat 5y ago
> what are we supposed to do if you are not allowed to both use goto or have multiple returns in a function (in C)
Move jobs.
But seriously this is a good point. goto is practically necessary to manage memory in C. Having only one return point is justified in functions that manage heap memory. Standard C has no RAII, defer, finally, or any other alternative but goto.