From: bobduff@dsd.camb.inmet.com (Bob Duff)
Subject: Re: Change to obscure visibility rule in 9x
Date: Wed, 19 Oct 1994 12:33:23 GMT
Date: 1994-10-19T12:33:23+00:00 [thread overview]
Message-ID: <Cxx6vp.1s3@inmet.camb.inmet.com> (raw)
In-Reply-To: INFO-ADA%94101904360935@vm1.nodak.edu
In article <INFO-ADA%94101904360935@vm1.nodak.edu>,
Simtel20 Transfer <HARBAUGH@ROO.FIT.EDU> wrote:
>Bob Duff writes:
> 2.a Reason: The reason for making overloadable declarations with
> profiles special is to simplify compilation: until the compiler has
> determined the profile, it doesn't know which other declarations are
> homographs of this one, so it doesn't know which ones this one should
> hide. Without this rule, two passes over the _specification or
> generic_instantiation would be required to resolve names that denote
> things with the same name as this one.
>
>So the compiler has to look at a few hundred bytes of source code twice,
>With today's 8MB and higher PCs that doesn't seem like any problem.
The issue is not an efficiency issue, but a compiler complexity issue.
Forcing the compiler to have a first pass to figure out the type profile
of a given subprogram, then go back and decide which things are
homographs of the subprograms, and then make a second pass, doing
overload resolution on the default expressions, would be a large amount
of extra complexity in the compiler, just to handle something silly that
nobody would really want to write: "function F(X: Integer := F);".
Of course you're right that compilers have plenty of memory to do this
these days. In fact they probably had plenty of memory in 1983 --
subprogram specs aren't that big. But compiler complexity causes
compiler bugs -- a Bad Thing.
- Bob
--
Bob Duff bobduff@inmet.com
Oak Tree Software, Inc.
Ada 9X Mapping/Revision Team (Intermetrics, Inc.)
next parent reply other threads:[~1994-10-19 12:33 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <INFO-ADA%94101904360935@vm1.nodak.edu>
1994-10-19 12:33 ` Bob Duff [this message]
1994-10-19 9:39 Change to obscure visibility rule in 9x Simtel20 Transfer
[not found] <GRAHAM.94Oct18094458@clsi.clsi.com>
1994-10-18 17:38 ` Bob Duff
1994-10-20 4:01 ` Paul Graham
[not found] ` <GRAHAM.94Oct20000151@canopus.clsi.com>
1994-10-20 14:46 ` Bob Duff
-- strict thread matches above, loose matches on Subject: below --
1994-10-18 13:44 Paul Graham
1994-10-18 15:23 ` Robert I. Eachus
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox