4 ms·
I'm not hating, I think it'll help clean up my PHP code. Just like you said, there's nothing wrong with GOTOs unless they're abused, just like any other languag
by Oompa 17y ago
I'm not hating, I think it'll help clean up my PHP code. Just like you said, there's nothing wrong with GOTOs unless they're abused, just like any other language feature.
- aceofspades19 17y agoHow would gotos clean up your code?
- pmjordan 17y agoThey can be extremely useful in error handling. They're also great as a substitute for labeled break statements if your language doesn't support them.
- aceofspades19 17y agoWhat ever happened to exceptions, which were explicitly invented to handle errors
- pmjordan 17y agoYeah. Turns out they're no silver bullet either. These days, my approach is pragmatic: use whatever works and produces the most readable code.