CVS difference for ai12s/ai12-0038-1.txt

Differences between 1.13 and version 1.14
Log of other versions for file ai12s/ai12-0038-1.txt

--- ai12s/ai12-0038-1.txt	2015/01/27 05:03:20	1.13
+++ ai12s/ai12-0038-1.txt	2015/01/28 00:11:24	1.14
@@ -796,3 +796,56 @@
 20-20 (or maybe 20-15 in this case).
 
 ****************************************************************
+
+From: Jeff Cousins
+Sent: Tuesday, January 27, 2015  10:47 AM
+
+> Probably should have left Pure packages alone (and mainly for distribution)
+> and invented an aspect (say, Global => null :-) for side-effect free
+> subprograms that can work for parallel and proof applications. But, as you
+> say, hindsight is 20-20 (or maybe 20-15 in this case).
+
+The main (only?) complaint that I've heard about Ada 2012 is that out parameters
+shouldn't have been allowed for functions, for those who want more freedom,
+without providing a means of doing the converse - an aspect for no out
+parameters and an aspect for no side effects (which can be applied either
+locally via an aspect spec, or globally, e.g. a pragma in gnat.adc), for those
+who want to restrict things.
+
+****************************************************************
+
+From: Randy Brukardt
+Sent: Tuesday, January 27, 2015  5:32 PM
+
+...
+> The main (only?) complaint that I've heard about Ada 2012 is that out
+> parameters shouldn't have been allowed for functions, for those who
+> want more freedom, without providing a means of doing the converse -
+> an aspect for no out parameters
+
+That sounds like a restriction (someone should propose something). An aspect
+makes no sense, as it would have to be provided on each subprogram, and it's
+pretty easy to see if an individual subprogram has an out parameter. :-)
+
+...
+> and an aspect for no side effects (which can be applied either locally
+> via an aspect spec, or globally, e.g.
+> a pragma in gnat.adc), for those who want to restrict things.
+
+Ada has never had such a thing (and no, Pure does not count, it's both too
+limiting [all in the same package] and not limiting enough [allows dereferences
+and other problematic operations]). We briefly tried to come up with such a
+thing for Ada 2005, but couldn't agree on how it should work (how much checking,
+what is and is not allowed, and so on).
+
+One hopes that the Global aspect will provide the needed functionality without
+the controversy.
+
+One could imagine a restriction to prevent functions with side-effects, but as
+that would prevent about 80% of useful functions, I would guess that no one
+would use it. It would be like forcing Pure everywhere; that's virtually
+unusable at the package level, and such a thing would be 10 times worse. I
+suspect that's one of those things that sounds good in theory, but not so good
+in practice. Perhaps we need to provide it so people can figure that out???
+
+****************************************************************

Questions? Ask the ACAA Technical Agent