[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Chicken-users] Re: SRFI-12 non-compliance
From: |
felix winkelmann |
Subject: |
[Chicken-users] Re: SRFI-12 non-compliance |
Date: |
Tue, 28 Feb 2006 07:52:16 +0100 |
I'm not aware of any uses of overlapping properties. A patch is
welcome.
cheers,
felix
On 2/28/06, Reed Sheridan <address@hidden> wrote:
> From SRFI-12 documentation for condition-property-accessor:
>
> Given a composite condition created with MAKE-COMPOSITE-CONDITION, the
> procedure returns the value that is associated with prop-key in one of the
> components that satisfies (CONDITION-PREDICATE kind-key).
>
>
> But Chicken returns the value associated with kind-key in any member of a
> composite condition:
>
> (define foo (make-composite-condition (make-property-condition 'foo 'bar 1)
> (make-property-condition 'baz 'quux 3)))
> ;; Chicken returns 1. Behavior is undefined in SRFI-12, but probably should
> return #f or raise error
> ((condition-property-accessor 'foo 'quux) foo)
>
>
> And worse, it may return that of the wrong member:
>
> ;;SRFI-12 would return 3, Chicken returns 1
> (define bar (make-composite-condition (make-property-condition 'foo 'bar 1)
> (make-property-condition 'baz 'bar 3)))
> ((condition-property-accessor 'baz 'bar) bar)
>
> A fix is fairly easy, but I don't know how deeply assumptions about the
> current implementation run...
>
> Reed Sheridan
>
>