Re: VOTE

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

 



On Tue, 2006-12-26 at 14:07 -0500, Dmitriy Kropivnitskiy wrote:
> Terry Polzin wrote:
> > goto was also used in COBOL before "perform x thru y" became the common way of 
> > coding the procedure division.  I think it's also used in fortran as well.
> 
> There is actually a goto in many languages, including C, C++ and I think Java, but if you use goto in your C program, your colleagues are liable to 
> break your arms and knee-caps, knock out your teeth and poke out your eyes with a corkscrew and actually get away with it on grounds of justifiable 
> self defence.

Well, if you read Kernighan & Ritchey's original "The C Programming
Language" book, the "goto" was only put in because C doesn't provide a
multi-level break statement.  The only way out of that situation short
of lots and lots of sentinel values is a goto.  Of course, they also
state that if you are more than four levels of indentation deep, you
probably should think about splitting out a function or rethinking your
logic.

There are times where a "goto" is appropriate, but one should try to
minimize its use--true in almost any procedural language.  If you want
to abuse the "goto", write in BASIC.  :-)

----------------------------------------------------------------------
- Rick Stevens, Senior Systems Engineer     rstevens@xxxxxxxxxxxxxxx -
- VitalStream, Inc.                       http://www.vitalstream.com -
-                                                                    -
-       "I'd explain it to you, but your brain might explode."       -
----------------------------------------------------------------------

-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux