4 ms·
Quick question: all the goto fail's where fail: return false; This is just to perhaps change return false to something else in the future, correct? Els
by djoldman 5y ago
Quick question: all the goto fail's where
fail:
return false;
This is just to perhaps change return false to something else in the future, correct? Else why not just return false everywhere instead of goto fail
- namdnay 5y agoI think it’s to cleanly show when he is using his pseudo-exception handling system. So goto fail would be “throw”
- alksjdalkj 5y agoNot sure if this is the author's reason but I find it helpful to have a single return point from functions. Much easier to follow code paths. You'll see this in some places in Linux's source too.
- slim 5y agoNot op, but that's obviously in case you need to do something more complicated than returning false later. It's good practice