[Gluster-devel] An interesting take on GoTo statement by Dijkstra -
Nagaprasad Sathyanarayana
nsathyan at redhat.com
Fri Jan 16 03:08:08 UTC 2015
Thanks Jeff and Kaleb for providing a good insight.
At least in Gluster code I have not come across any use of go to other than forward and out.
On 16-Jan-2015, at 12:21 am, Jeff Darcy <jdarcy at redhat.com> wrote:
>> Since the goto idiom that Gluster uses generates the same code — which
>> is what matters — I gave up my short-lived battle for not using it.
>
> One handy rule of thumb is based on whether a "goto" is forward or back,
> in (to a loop or other control contruct) or out. Forward and out are
> generally OK - no worse than extra state flags and better than code
> duplication - so they generally don't bother me. A handful of times in
> my entire career, I've seen a backward goto that was (weakly) justified.
> I've never seen an inward goto that was anything but pure evil, and I
> don't expect to. Fortunately, many people don't even know they're
> possible, so they're rare.
> _______________________________________________
> Gluster-devel mailing list
> Gluster-devel at gluster.org
> http://www.gluster.org/mailman/listinfo/gluster-devel
>
>
More information about the Gluster-devel
mailing list