comp.lang.ada
 help / color / mirror / Atom feed
From: creedy@cca.UUCP (Christopher Reedy)
Subject: Re: Ada '88 musings
Date: Thu, 2-Jan-86 15:44:45 EST	[thread overview]
Date: Thu Jan  2 15:44:45 1986
Message-ID: <5458@cca.UUCP> (raw)

In article <> stt@ada-uts.UUCP writes:

>Here are some proposals for Ada '88, arising from
>our use of Ada in building compilers, database managers, etc:
>
>  1)  Support user-defined finalization for
>      packages and limited types.
>  2)  Support user-defined assignment for limited types.
>  3)  Extend identifier visibility rules to eliminate need
>      for most "use" clauses.
 . . .
>One mechanism for implementing (1) would be as follows:
 . . .
>
>Let me be the first to say that the proposed syntax is pretty
>ugly, . . .
(Let me be the first to agree with you :-)  Actually, I like this idea.
However, I think you left out support for user defined initialization
for limited types.  Without this it does not seem possible to determine
when an object is uninitialized except for the case of access variables, 
where the compiler supplies a default initialization.  (See comment to #2
below.)
>
>The implementation of (2) is pretty straightforward, stealing all
>the rules from user-defined "=", except that the subprogram spec must be
>of the form:
>   procedure ":="(L : in out LIM_TYPE; R : in LIM_TYPE) is
                       ^^^^^^  
>   begin ... end ":=";
Interesting choice.  I would have thought that the proper form of the
argument is "out", not "in out".  The semantics of "in out" would seem to 
require that the object be initialized prior to invoking the procedure. 
This isn't possible if the assignment is specifically intended to 
initialize the object.  This usage might be feasible if there is a defined
initialization (compiler or user) for objects of type LIM_TYPE.
>
>The implementation for (3):
>Add a third place to search for identifiers after consulting
>"direct" visibility and "use" visibility -- "defining-package"
>visibility.  . . .
I also like this idea.  However, in keeping with the general philosophy 
of Ada that "hidden" defaults should not be a source of confusion to the
programmer and maintainer, it would seem that something like a limited
form of USE that makes the operator symbols visible without making the
entire package visible would be more appropriate.

Chris Reedy

             reply	other threads:[~1986-01-02 20:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1986-01-02 20:44 Christopher Reedy [this message]
  -- strict thread matches above, loose matches on Subject: below --
1985-12-31 21:40 Ada '88 musings stt
1986-01-03 19:23 ` stt
1986-01-09 20:33 ` Scott Pilet
replies disabled

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