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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,4b06f8f15f01a568 X-Google-Attributes: gid103376,public From: Brian Rogoff Subject: Really a U.S. thing? (Was Re: Software landmines (loops)) Date: 1998/09/01 Message-ID: #1/1 X-Deja-AN: 386945925 References: <6r9f8h$jtm$1@nnrp1.dejanews.com> <6renh8$ga7$1@nnrp1.dejanews.com> <6rf59b$2ud$1@nnrp1.dejanews.com> <6rfra4$rul$1@nnrp1.dejanews.com> <35DBDD24.D003404D@calfp.co.uk> <6sbuod$fra$1@hirame.wwa.com> <35f51e53.48044143@ <904556531.666222@miso.it.uq.edu.au> <35EAEC47.164424A7@s054.aone.net.au> <6sgn8l$7aq$1@nnrp1.dejanews.com> Content-Type: TEXT/PLAIN; charset=US-ASCII X-Trace: 904690562 2861 bpr 206.184.139.132 Mime-Version: 1.0 Newsgroups: comp.lang.ada Date: 1998-09-01T00:00:00+00:00 List-Id: On Tue, 1 Sep 1998 dewarr@my-dejanews.com wrote: > > ... snip ... > > Well it is not necessarily clear that this restatement is > less efficient. A compiler could manage to optimize the awkward > flag version back to the simple version with exits. Interestingly > few compilers do this optimization. A similar case is optimizing > an awkward case statement of a finite state machine back to the > simple and efficient version with gotos. > > Given how common serious goto-allergy is, especially in the > US, and seeing how many people are willing to contort their > code to avoid gotos, these are optimizations that are probably > worthwhile including in modern compilers for this class of > languages. OK, I have two questions here. First, I remember reading in some (Ada-Europe?) proceedings a paper about how goto causes extra work in compilers and is not really necessary in scanners and the like since case statements compile to comparable code. I take it you think that this is false? Also, do you really think this goto-allergy is more pronounced in the USA? As a native born American who uses goto infrequently, I am curious. It could be true, I was also taught that Ada sucks, but as a contumacious student it was hardly likely that the truth could be kept concealed from me for long :-). Have you found that Americans bought into the goto-phobia more than others? -- Brian