comp.lang.ada
 help / color / mirror / Atom feed
From: claveman@cod.nosc.mil (Charles H. Sampson)
Subject: Re: Adding Things to Package System
Date: 1999/02/26
Date: 1999-02-26T00:00:00+00:00	[thread overview]
Message-ID: <1999Feb26.202551.9334@nosc.mil> (raw)
In-Reply-To: 36D31FC0.A39BEBAA@averstar.com

In article <36D31FC0.A39BEBAA@averstar.com>,
Tucker Taft  <stt@averstar.com> wrote:
>Charles H. Sampson wrote:
>> 
>> ... yet this is legal code that the
>> compiler can't handle, in violation of 1.1.3(2).
>
>It is not portably "legal" code, unfortunately.  It is
>code that is legal if there are no additions to package
>System, but as you point out, additions to package System
>are permitted.
>
>>      Am I correct in assuming that 1.1.3(2) rules?
>
>No.  Your code is not "universally" legal.  To
>minimize non-portabilities, remove any "use" for package System.
>Use a rename if you find "System." too painful an addition
>at every reference to some declaration in package System.
>
     While the discussion to date has been interesting, I was just 
about to post a followup noting that no one had responded to my pointing 
out that three paragraphs of the LRM are in conflict.  Then Tucker Taft 
took care of that, as he often does.

     I'm not really happy with Tucker's response, but I'm not too sur-
prised either.  I am a little surprised about a couple of terms that I'm 
not familiar with: "portably 'legal' code" and "'universally' legal".  
Other than that, I suppose that the demon Practicality is going to com-
mand that additions to System be allowed in the near term.  Perhaps in 
Ada 200X, ...

     Still, even though it's not surprising, saying that 1.1.3(2) is 
not a hard rule is disturbing.  Robert Dewar and I agree that additions 
to System are a poor idea.  Matthew Heaney has given an example of some 
spectacularly injudicious additions.  In spite of that, the rule that a 
conforming implementation must handle all legal Ada programs is "bent" 
to allow these additions.  (I haven't been able to find the definition 
of a legal Ada program, using the index of the LRM as my main tool.  My 
guess would be that it is a program written in the language as described 
in the LRM.  In that case, my program was legal.)

     I almost always write highly portable code.  I do it by being very 
careful of how I use those features that have implementation dependen-
cies and by not using implementation additions unless absolutely neces-
sary.  However, in the present example, I was tripped up by an addition 
that I wasn't using.  I guess I felt a little let down by the LRM.

     Yes, there are a number of ways of getting around the problem of 
additions to System, but I don't see why I should have to.  I would like 
to see some authority (is an ARG 95 in business?) come out very strongly 
in favor of the second sentence of 13.7(36): Any additions to System 
should be done in a child package rather than in System itself.

				Charlie
--
******

     For an email response, my user name is "sampson" and my host
is "spawar.navy.mil".




  reply	other threads:[~1999-02-26  0:00 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-02-18  0:00 Adding Things to Package System Charles H. Sampson
1999-02-18  0:00 ` dewar
1999-02-20  0:00   ` Charles H. Sampson
1999-02-20  0:00     ` Matthew Heaney
1999-02-21  0:00     ` dewar
1999-02-23  0:00 ` Tucker Taft
1999-02-26  0:00   ` Charles H. Sampson [this message]
1999-02-27  0:00     ` Tucker Taft
1999-02-28  0:00       ` dewar
1999-02-28  0:00     ` robert_dewar
replies disabled

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