X-Received: by 10.224.57.142 with SMTP id c14mr4657628qah.7.1402401969551; Tue, 10 Jun 2014 05:06:09 -0700 (PDT) X-Received: by 10.50.114.161 with SMTP id jh1mr445275igb.3.1402401969345; Tue, 10 Jun 2014 05:06:09 -0700 (PDT) Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!hw13no6059620qab.0!news-out.google.com!qf4ni19597igc.0!nntp.google.com!a13no611512igq.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.python Date: Tue, 10 Jun 2014 05:06:08 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=59.99.105.151; posting-account=mBpa7woAAAAGLEWUUKpmbxm-Quu5D8ui NNTP-Posting-Host: 59.99.105.151 References: <0a89c96d-de62-42ad-be48-6107ce10d215@googlegroups.com> <539396F3.5090508@stoneleaf.us> <2e94b972-a630-4190-bc33-1074eb3278e3@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <13f0af4e-727f-4fa6-a688-19c70ab4e2d2@googlegroups.com> Subject: Re: try/except/finally From: Rustom Mody Injection-Date: Tue, 10 Jun 2014 12:06:09 +0000 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Xref: csiph.com comp.lang.python:73085 On Tuesday, June 10, 2014 12:57:29 PM UTC+5:30, Thomas Rachel wrote: > Am 08.06.2014 05:58 schrieb Rustom Mody: > > Some people=EF=BF=BD think that gotos are a code-smell. > > =EF=BF=BD I am not exactly those people. > > A chap called E W Dijkstra made the statement: "Goto statement consider= ed > > harmful" and became famous. > And became widely misunderstood. If anybody would read the whole what he= =20 > wrote, people would learn that he doesn't criticise the *use* of goto,=20 > but he wants the *replacement* of goto with something else (like=20 > exceptions). > As C doesn't have exceptions, goto is in many cases the simplest and=20 > easiest way of handling errors. > Essentially, you can write both good and bad code both with and without= =20 > goto. Here is Dijkstra: http://www.u.arizona.edu/~rubinson/copyright_violations/Go_To_Considered_Ha= rmful.html First statement: | For a number of years I have been familiar with the observation that | the quality of programmers is a decreasing function of the density of | go to statements in the programs they produce. And here is Hoare, not identical to Dijkstra but with similar areas of=20 interest and similar views on correctness etc, very unambiguously criticising exceptions: | Ada has a plethora of features and notational conventions, many of them | unnecessary and some of them, like exception handling, even | dangerous. Do not allow this language in its present state to be | used in applications where reliability is critical http://en.wikipedia.org/wiki/Exception_handling#Criticism