GNU bug report logs - #18223
[PATCH] Fix thinko concerning object property docs

Previous Next

Package: guile;

Reported by: David Kastrup <dak <at> gnu.org>

Date: Fri, 8 Aug 2014 13:44:01 UTC

Severity: normal

Tags: patch

Merged with 14792

Done: Mark H Weaver <mhw <at> netris.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: David Kastrup <dak <at> gnu.org>
To: 18223 <at> debbugs.gnu.org
Subject: bug#18223: And here's direct proof that the doc is wrong:
Date: Sat, 09 Aug 2014 12:20:28 +0200
scheme@(guile-user)> (define wooziness (make-object-property))
scheme@(guile-user)> (set! (wooziness 5) #t)
$1 = #t
scheme@(guile-user)> (wooziness 5)
$2 = #t
scheme@(guile-user)> (set! (wooziness 1000000000000000000) #t)
$3 = #t
scheme@(guile-user)> (wooziness 1000000000000000000)
$4 = #f
scheme@(guile-user)> 

The property persists for 5 and evaporates for 1000000000000000000.
There is no reliable way to know whether it will persist for numbers.

And since Guile refuses to commit to guaranteeing (lambda (x) (eq? x x))
to return #t when x may be a number and since there is no guarantee just
which numbers may be represented by immediate values, there is no
context in which an object property on a number may safely be retrieved.

-- 
David Kastrup




This bug report was last modified 10 years and 285 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.