Re: An interesting take on GoTo statement by Dijkstra -

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 01/15/2015 12:13 PM, Nagaprasad Sathyanarayana wrote:
In a quest to find why good programmers are wary of the "Go To"
statement, came across this interesting article by /Edsger W. Dijkstra/ .

http://www.u.arizona.edu/~rubinson/copyright_violations/Go_To_Considered_Harmful.html.


goto statements that cause one to go back & forth across the code are annoying to me. However, if goto statements are used to return control from a common point within a function, they enhance readability and also help in ensuring that we perform necessary cleanup/terminal actions for a function in a single place.

It is to be noted that Dijkstra's article appeared before C was invented. If you are interested in understanding more about goto, Knuth's paper titled Structured Programming with go to statements [1] and a lkml thread on the same [2] can be helpful.

Cheers,
Vijay

[1] http://dl.acm.org/citation.cfm?id=356640&dl=ACM&coll=DL&CFID=472165232&CFTOKEN=27447667 (needs access to ACM)

[2] http://koblents.com/Ches/Links/Month-Mar-2013/20-Using-Goto-in-Linux-Kernel-Code/

_______________________________________________
Gluster-devel mailing list
Gluster-devel@xxxxxxxxxxx
http://www.gluster.org/mailman/listinfo/gluster-devel



[Index of Archives]     [Gluster Users]     [Ceph Users]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux