--- ai05s/ai05-0044-1.txt 2007/04/03 05:07:53 1.1 +++ ai05s/ai05-0044-1.txt 2007/07/26 02:58:06 1.2 @@ -1,4 +1,4 @@ -!standard A.18(4/2) 07-04-02 AI05-0044-1/01 +!standard A.18(4/2) 07-07-17 AI05-0044-1/02 !standard A.18.2(231/2) !standard A.18.3(145/2) !standard A.18.6(57/2) @@ -20,7 +20,7 @@ "Sorted smallest first" also is defined. -"=" formal functions for the Set containers are required to return True for equivalent +"=" formal functions for the Set containers are required to return False for non-equivalent elements. !question @@ -73,8 +73,8 @@ Make similar changes to A.18.3(145/2), A.18.6(57/2), A.18.9(79/2), A.18.16(5/2), and A.18.16(9/2). -Add "If the actual for the generic formal function "=" does not return True for any -pair of equivalent elements, then the behavior of the container function "=" is unspecified." +Add "If the actual for the generic formal function "=" returns True for any pair +of non-equivalent elements, then the behavior of the container function "=" is unspecified." to A.18.8(65.2) and A.18.9(79/2). @@ -1527,6 +1527,32 @@ This is required to allow implementations to compare only equivalent elements to determine the result of set-wise "=". + +**************************************************************** + +From: Pascal Leroy +Date: Tuesday, July 17, 2007 2:58 AM + +The last bit of wording in this AI [version /01 - ED] has: + +Add "If the actual for the generic formal function "=" does not return +True for any pair of equivalent elements, then the behavior of the +container function "=" is unspecified." +to A.18.8(65.2) and A.18.9(79/2). + +This is wrong. As explained in the email thread of the AI, the +requirement ought to be that equality implies equivalence, not the other +way around. Think of a set of strings: equality could be normal string +equality, and equivalence could be based on case-insensitive comparison. +This is fine, as it makes it possible to implement set equality in linear +time, but it fails the above rule. + +The wording should be changed to: + +Add "If the actual for the generic formal function "=" returns True for +any pair of non-equivalent elements, then the behavior of the container +function "=" is unspecified." +to A.18.8(65.2) and A.18.9(79/2). ****************************************************************

Questions? Ask the ACAA Technical Agent