I dont think there is a preference; well, it is only a personal preference :-)

One thing that is nice about the goto is that there is only one return for the 
function. Sure, it is sort of cheating, but still… and of course if you want to 
execute a block of code on exit the goto is nice. But I dont think it really 
matters all that much one way or the other (imo).

Will

> On Nov 10, 2015, at 12:15 AM, Justin Mclean <[email protected]> wrote:
> 
> hi,
> 
> Just curious re the use of "goto err” vs multiple returns in a function. Is 
> there any reason the goto is preferred?
> 
> Thanks,
> Justin

Reply via email to