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: eachus@spectre.mitre.org (Robert I. Eachus) Subject: Re: Not intended for use in medical, Date: 1997/05/09 Message-ID: #1/1 X-Deja-AN: 240634267 References: <3.0.32.19970423164855.00746db8@mail.4dcomm.com> <5kmek2$9re@bcrkh13.bnr.ca> Organization: The Mitre Corp., Bedford, MA. Newsgroups: comp.lang.ada Date: 1997-05-09T00:00:00+00:00 List-Id: In article bobduff@world.std.com (Robert A Duff) writes: > Instead of ++, I would be just as happy with: > Increment(Average_Daily_Rate_Of_Pay); So use it. This is perfectly legal Ada, and I have a package kicking around somewhere with those "additional" operations which are procedures. > But my point was that the side-effect issue is more important than this > lexical stuff. I would object to: > Nice_Long_Array_Name[Increment(Nice_Long_Integer_Name)] := ...; > on the same basis (where this (evil) Increment both modifies its > argument, and returns a result). I realize I'm mixing Ada and C > notation there. Which is why it didn't get added to Ada 95, in spite of Robert Dewar's arguments in favor. The few cases where you do want functions with side-effects (random number generators being the prime example) can be written in Ada with a bit of extra work in the private part. > Perhaps. Who knows? I think it's mainly a cultural thing -- > everybody does it that way, so new programmers learn to do it that > way. No, it is cultural, but the language syntax does seem to have a very strong influence on the culture. One reason I believe that Algol 68 never succeeded was that the cultural imperitives implicit in the notation were in conflict. I once thought that translating the reserved* words into German, Dutch, or Czeck would have made people mcuh more comfortable with it. *Yes, in the standard they are not techically reserved, but did anyone have an implementation where they weren't? -- Robert I. Eachus with Standard_Disclaimer; use Standard_Disclaimer; function Message (Text: in Clever_Ideas) return Better_Ideas is...