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-Thread: 103376,f5508b044317ceed X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!news.glorb.com!newscon02.news.prodigy.net!prodigy.net!newsfeed-00.mathworks.com!nntp.TheWorld.com!not-for-mail From: Robert A Duff Newsgroups: comp.lang.ada Subject: Re: Question about controlled types. Date: Thu, 07 Feb 2008 11:30:51 -0500 Organization: The World Public Access UNIX, Brookline, MA Message-ID: References: <47aa5ca6$0$32487$4d3efbfe@news.sover.net> NNTP-Posting-Host: shell01.theworld.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: pcls6.std.com 1202401853 9221 192.74.137.71 (7 Feb 2008 16:30:53 GMT) X-Complaints-To: abuse@TheWorld.com NNTP-Posting-Date: Thu, 7 Feb 2008 16:30:53 +0000 (UTC) User-Agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.3 (irix) Cancel-Lock: sha1:JZCC2F+/sS69nW4QVTm79USE5kE= Xref: g2news1.google.com comp.lang.ada:19730 Date: 2008-02-07T11:30:51-05:00 List-Id: Hyman Rosen writes: > There are reasons for doing assignment like this in Ada (or > at least I think so - I don't really know Ada), but the C++ > assignment operator model is much cleaner. Right, the C++ way has the advantage that a single operation can get its hands on the left- and right-hand sides at the same time. The reason Ada doesn't have this feature is that we couldn't figure out how to make it work for records whose discriminants can change. And we couldn't simply outlaw that case, because it would introduce a violation of the generic contract model. - Bob