From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Instanciation in a package spec.
Date: Sat, 25 Jan 2003 12:04:11 +0100
Date: 2003-01-25T12:04:11+01:00 [thread overview]
Message-ID: <b0tqtq$sm4n6$1@ID-77047.news.dfncis.de> (raw)
In-Reply-To: wcc3cnju96e.fsf@shell01.TheWorld.com
Robert A Duff wrote:
> Dmitry A. Kazakov <mailbox@dmitry-kazakov.de> writes:
>
>> >The problem here is the elaboration model of Ada. The *visibility* of
>> >things is too closely tied to the *elaboration* order. I have worked
>> >out a different model of elaboration that doesn't have this problem (but
>> >still retains all the advantages of the Ada model). Unfortunately, it's
>> >not Ada.
>>
>> Why it cannot become Ada?
>
> My model would require incompatible changes to Ada.
> Therefore, it would be suitable for a from-scratch language design,
> but it is not suitable for a modification to Ada as it stands today.
One can call a surgeon now, or wait till a butcher comes. (:-))
>> In other words, what is the price of your model?
>>
>> Can X become static (in your model), when F is pure?
>
> Well, I have ideas along those lines, but I think that's a separate
> issue. It depends exactly how "pure" is defined. Are you willing to
> tolerate pure functions with infinite loops? So the compiler will go
> into an infinite loop evaluating a call to F at compile time?
> Sounds OK to me, but it might surprise some folks.
pragma Limit_Compile_Time (<time-in-seconds>); -- (:-))
> Ada currently has no pragma Pure for individual functions. Just
> packages.
Yes, that is bad.
> Ada currently allows machine-code inserts in pure code. Must the
> compiler have access to the target machine during compilation?
Target machine emulation, ooch. I'd better drop machine-code insertions for
pure code.
> Is it even meaningful?
The problem is how far one could go. Compile-time static objects used at
run-time may still require some sort of additional elaboration before first
use. I.e. an object could be potentially elaborated twice. How to reconcile
that.
--
Regards,
Dmitry A. Kazakov
www.dmitry-kazakov.de
next prev parent reply other threads:[~2003-01-25 11:04 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-01-22 10:48 Instanciation in a package spec Grein, Christoph
2003-01-22 16:54 ` Robert A Duff
2003-01-23 10:54 ` Jean-Pierre Rosen
2003-01-23 14:19 ` Robert A Duff
2003-01-23 15:13 ` Dmitry A. Kazakov
2003-01-23 16:23 ` Robert A Duff
2003-01-25 11:04 ` Dmitry A. Kazakov [this message]
2003-01-23 15:13 ` Jean-Pierre Rosen
2003-01-23 16:14 ` Robert A Duff
-- strict thread matches above, loose matches on Subject: below --
2003-01-22 10:22 Gautier direct_replies_not_read
2003-01-22 17:53 ` Martin Dowie
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox