[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

EQ?, again



Executive Summary: 1-O, 2-O, 3-U, 4-U, 5-T, 6-T

1. (EQ? (LAMBDA (X) X) (LAMBDA (Y) Y)) ;"Coalescing"

   O. Mathematically equivalent functions should be allowed to return
      true, but not required to EXCEPT when the implementation provides
      any operation which could distinguish the resulting objects using
      non-functional means. That is, if an operation 
	(DISCLOSE (LAMBDA (X) X)) returns (LAMBDA (X) X)
      then (EQ? X Y) would not be allowed return true for mathematically
      equivalent functions unless (EQ? (DISCLOSE X) (DISCLOSE Y)) would
      also return true, and so on. In the special case where such 
      operations were provided and the compiler could prove that they
      would never be used, I have no objection to optimizing the two
      closures to be eq. That is,
	(DEFINE FOO (LAMBDA (X) X))
	(DEFINE BAR (LAMBDA (Y) Y))
	(EQ? FOO BAR)
      should be required to return false in implementations which support
      debugging operations that could distinguish FOO and BAR, but 
	(EQ? (LAMBDA (X) X) (LAMBDA (Y) Y))
      in the same implementation should be permitted to return true.  My
      point being that EQ? is currently an essential primitive in system
      design and it would be a shame to let it get turned into something
      which thwarted debugging.

2. (EQV? (LAMBDA (X) X) (LAMBDA (Y) Y))

   O. I think it important to say that EQV? cannot return false when EQ?
      has returned true. The combination of this point and my arguments
      in 1 above lead to the conclusion that this may return true sometimes
      but may not (for reasons related to halting problems) not be required
      to do so.

3. (LET ((X (LAMBDA (Z) Z))) (EQ?  X X))		;"Splitting"

   U. My intuition says that this should always return true, but Jonathan
      has convinced me to think harder on the issue before insisting that
      the intuition is valid. I would like to reserve the right to speak
      later on this one.

4. (LET ((X (LAMBDA (Z) Z))) (EQV? X X))

   U. My intuition is also that this should return true, but I am not
      currently taking a stand pending a resolution on item 3.

5. (LET ((X ... any expression evaluating to an exact number ...)) 
     (EQ? X X))

   T. I believe my views on this are on record already.

6. (EQ? #\X #\X)
 
   T. If there is some argument from Will or Jonathan as to why this 
      would clutter the semantics, I don't think I've heard it. Depending
      on my decision about item 3, I may be willing to change my views 
      on this if I heard a argument for it.