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,f51e93dacd9c7fca X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-06-21 09:58:57 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!wn1feed!worldnet.att.net!204.127.198.204!attbi_feed4!attbi_feed3!attbi.com!sccrnsc01.POSTED!not-for-mail Message-ID: <3D135A61.F0CDAE33@attbi.com> From: Mark Biggar X-Mailer: Mozilla 4.79 [en]C-{C-UDP; EBM-SONY1} (Win98; U) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: status of Ada STL? References: <3d0ce154_5@news.bluewin.ch> <3d0e574d_2@news.bluewin.ch> <3d0fb5e8$1_3@news.bluewin.ch> <4006huok6mmo59d3lmkvqt3ffpccu0c2d6@4ax.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 12.235.88.57 X-Complaints-To: abuse@attbi.com X-Trace: sccrnsc01 1024678736 12.235.88.57 (Fri, 21 Jun 2002 16:58:56 GMT) NNTP-Posting-Date: Fri, 21 Jun 2002 16:58:56 GMT Organization: AT&T Broadband Date: Fri, 21 Jun 2002 16:58:57 GMT Xref: archiver1.google.com comp.lang.ada:26568 Date: 2002-06-21T16:58:57+00:00 List-Id: "Dmitry A. Kazakov" wrote: > > procedure '':=" (Target : in out A; Source : A); -- (*) > > Note I do not demand that the copy constructor would be derived from > ":=". It is IMO a wrong idea to attempt to derive one from another. > C++ does it simplier. What is actually wrong in C++ is that the result > of "=" is not void. > > >Wouldn't it also fall apart if we started including "+:="? > > No, they should be just user-defined procedures. Whether they are > primitive or not should only depend on the freezing rules and whether > particular parameters are class-wide. > > (*) There is a minor problem with unconstrained subtypes passed as > inout and that discriminants cannot be changed. There are other problems as well. This was looked at in detail during the Ada95 revision. Allowing users to redefine ":=" using a procedure definition like that above was determine to be way too course grained. Do you expect your new assignment operation to compose for record or array types? What about variable initialization? Or, the assign out during procedure exit for out parameters? This is way ada95 controlled types are tagged and break the assignment process down into finer parts with Initialize, Adjust and Finalize as user definable hooks into a larger assignment process. This way use defines the type specific parts of data movement and the compiler is free to use them in various ways to move data around in ways the guarantees that the type's data abstractions are preserved. -- Mark Biggar mark.a.biggar@attbi.com