CVS difference for ais/ai-00282.txt

Differences between 1.2 and version 1.3
Log of other versions for file ais/ai-00282.txt

--- ais/ai-00282.txt	2002/01/24 04:54:13	1.2
+++ ais/ai-00282.txt	2002/02/05 02:06:24	1.3
@@ -364,3 +364,79 @@
 
 *************************************************************
 
+From: Pascal Leroy
+Date: Thursday, January 24, 2002  4:31 AM
+
+> If the attribute prefixes are some magic value (or if the original proposal
+> is used), we have a situation where a chunk of code may do very different
+> things if it is moved. Ada avoids that as much as possible; we try to avoid
+> position-dependent constructs.
+
+Well, the essence of the Line_Number attribute is to be position-dependent, so
+you'd have to be pragmatic here.  I don't like the notion of using Ada as the
+prefix, though, because Ada is not visible everywhere.
+
+> My big concern with this, though, is the difficulty of defining and
+> implementing this properly in generics. What is the full scope name of an
+> entity declared in the generic body?
+
+You'd have similar problems when using these attributes in default expressions.
+Does it take the line/scope of the place where the expression occurs, or the
+place where it is evaluated?
+
+The way out of this conendrum is again to be pragmatic: we want these attributes
+to return useful information, but we don't want to overspecify.  The RM language
+would have to state that they return some implementation-defined value, with an
+implementation advice saying that the value should identify as precisely as
+possible the scope/line where the attribute appears.  Then, trust the
+implementers to do something reasonable given the constraints of their
+technology.
+
+> Anyway, this looks worse and worse on close inspection. The value of this
+> proposal is low, so I don't think we can justify introducing a lot of
+> problems with it.
+
+I disagree.  I have often felt the need for a feature like that.  It would be
+useful to standardize it, in order to be able to log information in a way that
+is independent of the compiler.  But we should not insist that the actual output
+produced be the same for different compilers.
+
+*************************************************************
+
+From: Tucker Taft
+Date: Thursday, January 24, 2002  6:35 AM
+
+GNAT has used "Standard" as a prefix for various attributes,
+and that seems most appropriate, since it is visible
+everywhere.
+
+*************************************************************
+
+From: Bob Duff
+Date: Thursday, January 24, 2002  8:57 AM
+
+> Well, the essence of the Line_Number attribute is to be position-dependent,
+> so you'd have to be pragmatic here.  I don't like the notion of using Ada
+> as the prefix, though, because Ada is not visible everywhere.
+
+GNAT uses Standard as the prefix of a whole bunch of attributes that
+don't relate to any particular entity.  It's annoyingly long, though,
+for the purpose here.  OTOH, you could simply require the prefix to be
+Ada, and require (the predefined) Ada to be visible.  I usually put the
+code for a whole program or large subsystem under a single root package,
+and that root package says "with Ada; use Ada;", so that would be
+convenient.  It's still a kludge, though.
+
+> > Anyway, this looks worse and worse on close inspection. The value of this
+> > proposal is low, so I don't think we can justify introducing a lot of
+> > problems with it.
+>
+> I disagree.  I have often felt the need for a feature like that.  It would be
+> useful to standardize it, in order to be able to log information in a way
+> that is independent of the compiler.  But we should not insist that the
+> actual output produced be the same for different compilers.
+
+I tend to agree with Randy, that this feature is not worth the trouble.
+
+*************************************************************
+

Questions? Ask the ACAA Technical Agent