bug-guile
[Top][All Lists]
Advanced

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

bug#18223: And here's direct proof that the doc is wrong:


From: David Kastrup
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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]