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: Andi Kleen Subject: Re: Software landmines (was: Why C++ is successful) Date: 1998/08/23 Message-ID: #1/1 X-Deja-AN: 383866469 Distribution: world Sender: andi@fred.muc.de References: <6rnhhe$e2u$1@nnrp1.dejanews.com> Organization: [posted via] Leibniz-Rechenzentrum, Muenchen (Germany) Newsgroups: comp.lang.ada Date: 1998-08-23T00:00:00+00:00 List-Id: dale@cs.rmit.edu.au (Dale Stanbrough) writes: > dewar@gnat.com wrote: > > "No, it is a huge advantage of return over a *bad* use of goto. But nearly > every feature in a language can be badly misused. We didn't eliminate > assignments from Ada, even though they can be (and are all the time) > horribly misused, and even though we know perfectly well that you can > write programs with no assignments with no loss in expressive power." > > Do you have examples of the bad/excessive use of assignment statements? Assignments are equivalent to gotos. Just write the function as a big loop case .. statement, then you can use assignments as goto. In functional programming languages like ML or Scheme it is possible and easy to write assignless code, but these have lots of special tools (e.g. easy closures) that make that easier. -Andi