This is the mail archive of the guile@sourceware.cygnus.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Syntatic sugar and identifier permissivity


>>>>> "Jost" == Jost Boekemeier <jostobfe@calvados.zrz.TU-Berlin.DE> writes:

Jost> "Frozen class hierarchy" seems to be yet another word for
Jost> "module" or "module collection".  On page 6 he describes exactly
Jost> what "user defined" and "system defined" means.


>> 2. Need to distinguish what type of method combination the person
>> was defining.  The ability to define methods with a different
>> method-combination on these library methods which specialized on
>> library classes is not something that should be lightly thrown
>> away.

Jost> "That is, the user cannot change the behavior of the draw method
Jost> specialized to the class text-button.  If they want an alternate
Jost> method, it must be on a subclass of text-button."

Jost> In other words, if you are a developer of a new module "X" and
Jost> want to use my module "TEXT-BUTTON" which exports the class
Jost> text-button, you must not specialize your draw method to
Jost> TEXT-BUTTON's text-button.

Jost> Additionaly, as he says in the second part, you must not attach
Jost> a draw method to my text button even if there's currently no
Jost> draw method specialized to it.

Ok, but as I understand it, your method prevents us from doing this:

Module A:
(define-module (example A))
(define-class <class-A>)
(define-generic foo)
(define-method foo ((x <class-A>) (y <class-A>)))

Module B:
(define-module (example B)
               :use-module (example A))
(define-class <class-B>)
(define-method foo ((x <class-A>) (y <class-B>)))

This example meets Kiczales' requirement: "User-defined methods on
specialized generic functions must be specialized to a user-defined
class.", (since it is specialized to a user-defined class, <class-B>)
however I do not see how this would be possible in one of your
class-module-package hybrid systems.....

Jost> [from an old posting]
>> How are you handling methods defined in module A, but which
>> specialize on a class in module B.  Example of this would be a
>> (serialize x) function, or a (print x) function?

Jost> According to Kiczales paper: the module system must throw an
Jost> error.

Could you quote chapter and verse on that?

  -Eric

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]