From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,7728b533f7ab5fb6 X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: "(see below)" Newsgroups: comp.lang.ada Subject: Re: Avoiding side effects and other dogma. Date: Tue, 14 Oct 2008 14:48:12 +0100 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Trace: individual.net rO7bu6yYjzH1e/AImJ2Ttww1KASKlP3VHTlnYjZwreFSLHEr13 Cancel-Lock: sha1:vckVhcfiSycdKEdmVZD98C+mSiE= User-Agent: Microsoft-Entourage/12.12.0.080729 Thread-Topic: Avoiding side effects and other dogma. Thread-Index: AckuA3/CKy+rOG+WsEaBbtMVEkFM2g== Xref: g2news1.google.com comp.lang.ada:2378 Date: 2008-10-14T14:48:12+01:00 List-Id: On 14/10/2008 07:22, in article u8wsrwv9j.fsf_-_@no.email.thanks.invalid, "Anders Wirzenius" wrote: > "(see below)" writes: ... >> What is silly is tying yourself in knots to avoid a perfectly sensible way >> of doing something, because it is abominated by the adherents of a dogma. >> >> The trouble is that bright people (Dijkstra, Hoare, Dahl, etc) offer >> recommendations for general approaches, to be applied with common sense; but >> then their much dimmer followers turn the recommendations into religions. >> >> I encountered this a lot as a teacher. I remember giving a lecture on memory >> management techniques and being confronted at the end by one a student who >> demanded that I should say which was "the best". When I explained it was not >> possible to do that, he insisted that I really knew which was the best and >> was keeping the secret to myself. >> >> Too many software practitioners (among many others) have that mindset. > > As a teacher you may then be familiar with the difference between > "wanting to learn" and "programming for production". To me it is a > good technique to "strive for perfection" if you use that as a > tool for learning something about a subject. > You may write a program using a goto whenever you have a need for > jumping somewhere and after that write another version of the > program without a single goto. And then write a third version > adopting yet another dogma. The three versions are useless once > you have made up your mind about the consequences of adopting > different principles. You throw those versions in the recycle bin > and start to write the "common sense" adopted program > version. And keep that. That's fine: it directly contradicts the idea that there is precisely one "correct" way to do everything, and that pernicious idea is what I condemn. -- Bill Findlay chez blueyonder.co.uk