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,b5ab7c96b188b59e X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2004-01-16 10:23:57 PST Path: archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newshosting.com!news-xfer1.atl.newshosting.com!216.196.98.140.MISMATCH!border1.nntp.ash.giganews.com!border2.nntp.ash.giganews.com!nntp.giganews.com!wn11feed!worldnet.att.net!207.35.177.252!nf3.bellglobal.com!nf1.bellglobal.com!nf2.bellglobal.com!news20.bellglobal.com.POSTED!not-for-mail From: "Warren W. Gay VE3WWG" User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax) X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: The "()" operator revisited. References: <4003EEEC.40106@noplace.com> <%1WMb.25$3f4.77748@news20.bellglobal.com> In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Message-ID: Date: Fri, 16 Jan 2004 13:09:46 -0500 NNTP-Posting-Host: 198.96.223.163 X-Complaints-To: abuse@sympatico.ca X-Trace: news20.bellglobal.com 1074276532 198.96.223.163 (Fri, 16 Jan 2004 13:08:52 EST) NNTP-Posting-Date: Fri, 16 Jan 2004 13:08:52 EST Organization: Bell Sympatico Xref: archiver1.google.com comp.lang.ada:4466 Date: 2004-01-16T13:09:46-05:00 List-Id: Mark A. Biggar wrote: > Robert A Duff wrote: >> "Warren W. Gay VE3WWG" writes: >>> Robert A Duff wrote: >>>> "Warren W. Gay VE3WWG" writes: >>>> >>>>> Was operator assignment ever considered for Ada? If it was, and shot >>>>> down, what were the primary reasons against it? >>>> >>>> See AARM-7.6(17.a). >>>> - Bob >>> ... >> Sorry, I didn't realize you were talking about Ada 83. Why can't the >> user redefine ":=" in Ada 83? I don't know, but I guess the designers >> didn't like users redefining stuff like that. Same reason the user >> can't redefine "in" or aggregate notation or literal notation or array >> indexing notation, I guess. It seems inconsistent with the fact that >> you *can* redefine "=" and "+" and so forth. ... >> The C++ way has some advantages over the Ada way (where the user's >> control is split between Finalize and Adjust) because it's sometimes >> convenient to get your hands on both sides of the assignment at the same >> time. > > There are other issues as well. Ada has several things that look like > assigmment but are subtly different: Variable initialization, function > return, by-value parameter binding, etc. It was decided that allowing > a user to redefine assignment piecewise (initialize, adjust, finalize) > would allow the compiler to compose the various assignment like > operations out of those pieces and other things like bit-wise memory > copy without requiring the user to define all those different variants. OK, I am beginning to see where the issues lie. I suppose one extreme example involves variant records, where the size of the variant must be known in advance. A strict bit-by-bit copy followed by tweaking makes perfect sense to me in this scenario. Although, I suppose an implementation could assign maximum storage and potentially resize the object after the ":=" procedure was done. But it looks like there are some other issues involved in Ada that don't come up in a C++ context. Thanks for the explanations. Warren. -- Warren W. Gay VE3WWG http://ve3wwg.tk