14 ms·
When you are forced to follow stupid rules like having only one exit point in a function then goto can be used a lot in place of that, but what are we supposed
by panax 5y ago
When you are forced to follow stupid rules like having only one exit point in a function then goto can be used a lot in place of that, but what are we supposed to do if you are not allowed to both use goto or have multiple returns in a function (in C) ?
- 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.