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,99222a5bd46ef3c9 X-Google-Attributes: gid103376,public From: bobduff@world.std.com (Robert A Duff) Subject: Re: GOTO considered necessary (reworked) Date: 1997/06/17 Message-ID: #1/1 X-Deja-AN: 249226303 References: <5nn2fm$11dk$1@prime.imagin.net> <5nonfk$rcr@top.mitre.org> Organization: The World Public Access UNIX, Brookline, MA Newsgroups: comp.lang.ada Date: 1997-06-17T00:00:00+00:00 List-Id: In article , Robert Dewar wrote: >Within broad boundaries, I think the best approach is to write in the >clearest way possible, and then, if there is an efficiency problem, examine >ways to improve the code. Agreed. >I say within broad boundaries, because one needs to have a reasonable feel >for gross levels of efficiency. For example, I sometimes see Ada 95 >programs where controlled types have been used with complete abandon and >obvious obliviousness to the fundamental inefficiencies that result. I object to the term "fundamental" above. I believe it is possible (though not easy) to implement controlled types with near-zero overhead on entering and leaving the scope of a controlled variable. >But I would seldom chose between ways of doing things on an efficiency >basis, and I certainly would not do so in this case. I would use the >goto approach because I think it is clearer, even if it was less efficient, >unless I found that it made a critical efficiency difference. I agree on the criteria, but I disagree on the conclusion -- I like the non-goto version of FSM's better. I think it's important that we recognize that it's a close call, which is why intelligent people disagree on whether goto is appropriate in this situation. - Bob