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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,38fc011071df5a27 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-05-30 09:25:01 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!hammer.uoregon.edu!skates!not-for-mail From: Stephen Leake Newsgroups: comp.lang.ada Subject: Re: Ideas for Ada 200X Date: 30 May 2003 12:23:52 -0400 Organization: NASA Goddard Space Flight Center (skates.gsfc.nasa.gov) Message-ID: References: <6a90b886.0305262344.1d558079@posting.google.com> <3ED41344.7090105@spam.com> <3ED46D81.FF62C34F@0.0> <3ED46E07.4340CABC@0.0> <3ED4F3FD.A0EF7079@alfred-hilscher.de> NNTP-Posting-Host: anarres.gsfc.nasa.gov Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: skates.gsfc.nasa.gov 1054312795 3838 128.183.235.92 (30 May 2003 16:39:55 GMT) X-Complaints-To: usenet@news.gsfc.nasa.gov NNTP-Posting-Date: 30 May 2003 16:39:55 GMT User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 Xref: archiver1.google.com comp.lang.ada:38116 Date: 2003-05-30T16:39:55+00:00 List-Id: 18k11tm001@sneakemail.com (Russ) writes: > > Occasionally I run into code that looks something like: > > > > production_total( total_class ).shift( shift_index ) := > > production_total( total_class ).shift( shift_index ) + count; > > > > That would read a lot cleaner as: > > > > production_total( total_class ).shift( shift_index ) += count; > > Couldn't have said it better myself. What is wrong with having a style guide that says: "If you have statements like production_total( total_class ).shift( shift_index ) := production_total( total_class ).shift( shift_index ) + count; you must write an appropriate Increment function, and use it instead" Problem solved; no need for language change or compiler support. > And let's not forget that +=, -=, etc. also allow for more efficient > in-place vector/matrix operations because they avoid the need for a > temporary. If you don't understand this, that's OK, but please don't > argue with me because you will be wrong. Same argument; a package that provides vector/matrix math must provide an appropriate in-place Increment function. Ada is about ease of reading, _not_ about ease of writing. -- -- Stephe