CVS difference for acs/ac-00157.txt

Differences between 1.1 and version 1.2
Log of other versions for file acs/ac-00157.txt

--- acs/ac-00157.txt	2008/01/19 05:28:16	1.1
+++ acs/ac-00157.txt	2008/01/22 06:18:46	1.2
@@ -1,4 +1,4 @@
-!standard  11.4.2                                   08-01-18    AC95-00157/01
+!standard  13.15                                   08-01-18    AC95-00157/01
 !class Amendment 08-01-18
 !status received no action 08-01-18
 !status received 08-01-10
@@ -647,6 +647,63 @@
 
 And I do like the superpurity (although obviously the details would have to be
 fleshed out).
+
+****************************************************************
+
+From: Robert A. Duff
+Date: Saturday, January 19, 2008  8:02 AM
+
+[From a thread in AC-00156 - ED]
+
+> Indeed, I proposed user-defined constraints in large part to get some of
+> this information into the Ada subprogram specification where it belongs.
+
+I think user-defined constraints are a good idea, but I'd prefer to call them
+"invariants".
+
+Ideally, I'd like to be able to define them on the fly, but for that matter,
+I'd like to be able to say "procedure P(X : Integer range 1..10);" or even
+"procedure P(X: Integer range <>; A: String(X'Range));" or something like that!
+I'm not being entirely serious, here...
+
+****************************************************************
+
+From: Randy Brukardt
+Date: Saturday, January 19, 2008  9:09 PM
+
+Bob Duff writes:
+> "Randy Brukardt" <randy@rrsoftware.com> writes:
+>
+> > Cyrille Comar wrote:
+> > Indeed, I proposed user-defined constraints in large part to get some of
+> > this information into the Ada subprogram specification where it belongs.
+>
+> I think user-defined constraints are a good idea, but I'd prefer
+> to call them "invariants".
+
+When you say you want to call them "invariants", I have to assume you mean
+something different than what I proposed, which is just a more generalized
+Ada constraint (and which follows all of the rules of Ada constraints,
+including where they are checked). In that case, there is nothing
+"invariant" about them (they might only apply to the formal, the actual
+object is likely to have a different, weaker constraint, and because of
+aliasing, they might fail to hold after the initial check anyway). Besides,
+Ada has terminology for this concept, and using different terminology to
+mean the same thing is very confusing.
+
+> Ideally, I'd like to be able to define them on the fly,
+
+You can, of course, as you can declare a subtype anywhere that you can
+declare a subprogram spec. Maybe you mean you want to be able to declare
+them anonymously - an idea I don't support (I'm against the anonymous stuff
+that is already in Ada, and I don't want anymore of it).
+
+> ... but for that matter,
+> I'd like to be able to say "procedure P(X : Integer range 1..10);" or even
+> "procedure P(X: Integer range <>; A: String(X'Range));" or something like that!
+> I'm not being entirely serious, here...
+
+Thank goodness...
 
 ****************************************************************
 

Questions? Ask the ACAA Technical Agent