comp.lang.ada
 help / color / mirror / Atom feed
From: kst@thomsoft.com (Keith Thompson)
Subject: Re: Ada self-referential operators
Date: Sat, 11 Feb 1995 05:34:10 GMT
Date: 1995-02-11T05:34:10+00:00	[thread overview]
Message-ID: <D3tM4y.E91@thomsoft.com> (raw)
In-Reply-To: 3hg6gj$mkt@miranda.gmrc.gecm.com

In <3hg6gj$mkt@miranda.gmrc.gecm.com> bill@valiant (R.A.L Williams) writes:
[...]
> Obviously, any compiler which tried to optimise a basic block containing
> that would be in for a nasty surprise! So, OK, we disable statement level
> optimisation where overloaded assignment is used. Caveat emptor (I don't
> know the latin for programmer) -- if you use this construct, don't expect
> optimisation.

Optimization isn't really an issue.  Optimizers typically operate on
some intermediate form (or sometimes on machine code).  A call to a
user-defined operator (assignment or otherwise) would appear to the
optimizer as an ordinary subprogram call, which it could optimize or
not just as if it were written explicitly using call notation.  If the
optimizer has access to the body of the subprogram (e.g., if it's declared
inline), it may be able to do something with it.

As for user-defined assignment, (as in

    procedure ":="(Target: in out Some_Type; Source: in Some_Other_Type);

) I'd love to see it in the language myself, but defining it really is
more complicated than it looks.  I don't claim to understand all the
issues, so I'll leave it to others to address them.

-- 
Keith Thompson (The_Other_Keith)  kst@thomsoft.com (kst@alsys.com still works)
TeleSoft^H^H^H^H^H^H^H^H Alsys^H^H^H^H^H Thomson Software Products
10251 Vista Sorrento Parkway, Suite 300, San Diego, CA, USA, 92121-2718
When you're a nail, every problem looks like a hammer.



  reply	other threads:[~1995-02-11  5:34 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1995-02-10 17:07 Ada self-referential operators R.A.L Williams
1995-02-11  5:34 ` Keith Thompson [this message]
     [not found] <3id0oo$e64@gnat.cs.nyu.edu>
1995-02-23 17:45 ` Brian Hanson
1995-03-01 18:41   ` Thomas G. Coles (1W0)
  -- strict thread matches above, loose matches on Subject: below --
1995-02-01  9:34 R.A.L Williams
     [not found] ` <3hnoe6$1aoi@info4.rus.uni-stuttgart.de>
     [not found] ` <3grqrf$jkd@gnat.cs.nyu.edu>
1995-02-06 20:51   ` Kenneth Almquist
1995-02-08  2:06     ` John Volan
1995-02-08  6:45       ` Jay Martin
1995-02-08  9:04       ` Brian Rogoff
1995-02-08 20:13         ` John DiCamillo
1995-02-09 23:52           ` David Weller
1995-02-10  6:48         ` pang
1995-02-10 16:15           ` Robert I. Eachus
1995-02-09 17:30       ` Norman H. Cohen
1995-02-11 13:56         ` Robert Dewar
     [not found]   ` <3id9qi$a7m@usenet.srv.cis.pitt.edu>
1995-02-25 13:28     ` Larry Kilgallen, LJK Software
1995-03-08 23:26     ` Val Kartchner
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox