This is the mail archive of the guile@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] |
> Well, I find the concept of generic functions to fit much better with a > lisp (or scheme) environment I too find the concept of generic functions appealing. > and don't see any advantage to see > methods as associated with or encapsulated in individual classes. An alternative would be to have methods associated with modules. Then question then is: Can you associate modules with objects? One possible idea for combining generic functions with the kind of modularity I am talking about: When object is created, it carries with it the set of modules visible at the creating point. When a generic function is called, the applicable methods would be union of the methods belonging to the modules of each argument. This does sound rather expensive, but I think one could come up with clever ideas to keep things reasonably fast, especially for teh single-dispatch case. The real question is: How well would such a system work for the programmer? I don't know. I would be very curious to know. --Per Bothner Cygnus Solutions bothner@cygnus.com http://www.cygnus.com/~bothner