On Fri, Feb 29, 2008 at 10:41 AM, felix winkelmann <[EMAIL PROTECTED]> wrote: > On Thu, Feb 28, 2008 at 4:02 PM, Graham Fawcett > > <[EMAIL PROTECTED]> wrote: > > > > > It would be a smart idea to change the implementation, then, so that > > the unspecified value could not be tested with (eq?). That would > > prevent it from being 'misused'. > > The unspecified value is unspecified. It has both no identity and > no efforts are made to make it identity-less.
Right, but (eq? (void) (void)) => #t is a property that shouldn't exist for two unspecified values: by definition it gives identity to unspecified. (eq? (void) (void)) => #f is better, raising an exception is better still. To preserve the 'undefined' meaning, any functions that can test #<unspecified> should really be internal, e.g. in the ##sys# namespace. But as you say, it's unspecified, so this is a divergent discussion. :-) > > There does seem to be a good case for an immediate value that *can* be > > tested this way, though. John et. al. wouldn't have used (void) in > > eggs if there weren't. Record instances aren't really a great answer > > (though I suggested them myself) since different records of the same > > type will fail an identity test. > > Unless you use a single unique instance. That would be problematic in compiled code, would it not? Where is the instance stored? Graham _______________________________________________ Chicken-users mailing list Chicken-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/chicken-users