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,d1df6bc3799debed X-Google-Attributes: gid103376,public From: bobduff@world.std.com (Robert A Duff) Subject: Re: Not intended for use in medical, Date: 1997/05/06 Message-ID: #1/1 X-Deja-AN: 239897862 References: <3.0.32.19970423164855.00746db8@mail.4dcomm.com> <5kl9qc$g4d@bcrkh13.bnr.ca> <5kmek2$9re@bcrkh13.bnr.ca> Organization: The World Public Access UNIX, Brookline, MA Newsgroups: comp.lang.ada Date: 1997-05-06T00:00:00+00:00 List-Id: In article <5kmek2$9re@bcrkh13.bnr.ca>, Kaz Kylheku wrote: >>> Yes, legal, but horrible. A good reminder of why Ada does NOT have >>> the ++ operator built in :-) > >By the way, the x++ is just another way of writing the assignment expression x >+= 1, or x = x + 1 (the latter case evaluates x twice, of course). The real >``evil'' perhaps is that in C an assignment is an expression rather than a >statement, so that you can decorate a complex expression with assignments all >over the place. I agree (except I'd remove "perhaps"). There's nothing wrong with having short-hand notations like "++" and "+=". The language design flaw in C is that assignments return something "useful", thus encouraging side effects nested within expressions, like a[i++]. I'm not against *all* kinds of side effects, but I'm against most of them, including the one mentioned above. - Bob