[Top][All Lists]

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

bug#19459: #:export does not honor the merge-generics contract

From: Andy Wingo
Subject: bug#19459: #:export does not honor the merge-generics contract
Date: Thu, 23 Jun 2016 22:06:27 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

On Thu 23 Jun 2016 21:23, David Pirotte <address@hidden> writes:

> Hi Andy,
>> > (define-module (a)
>> >   #:use-module (oop goops)
>> >   #:export (<a>
>> >        !width
>> >        get-width
>> >        set-width))  
>> Here you export four bindings: one class and three generics.  Those
>> three generics have methods on <a>.
>> > (define-module (b)
>> >   #:use-module (oop goops)
>> >   #:use-module (a)  
>> Here you import the previous four bindings.
>> >   #:export (<b>
>> >        !width
>> >        get-width
>> >        set-width))  
>> However here you declare that you are going to export four new
>> bindings.
>> ...
> Under the exact circumstances of the original email, I disagree, see below.

I see.  You were expecting for the dynamically setting the
default-duplicate-binding-handler parameter to make a difference.
However I think this is maybe not the right way to set this up; see
reasoning in http://debbugs.gnu.org/cgi/bugreport.cgi?bug=20093.

However... I believe merge-generics is intended to merge duplicate
imported bindings.  It does not provide a copy-on-write version of an
imported generic, if that generic was not duplicated in the imports.
There is no facility in GOOPS to do that, AFAIU.

Did I get it right this time? :)


reply via email to

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