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]

virtual constructors



Is there a free software object-oriented scheme add-on that works with guile 
and allows virtual constructors, .i.e. operations that scans its arguments
and determines from them which class , exemplar or interface type should be
constructed, and then builds an object of the determined type from the
arguments?

A mop-based extension would probably not have problems with that, but there is
no free-software-mop for guile, and it would be too much bloated for most 
purposes.  

I tried yasos (if it can be considered as free software at all, the license 
does only grant unlimited use, not mention anything about modification and re-
distribution), BOS and pint (at least those can be used under GNU conditions).

A primitive approach would be to administrate a global assoc-list of tags and
classes (in BOS), or exemplars (in yasos), or interface types (in Pint). But
this seems to make trouble when e.g a variable denoting a class gets reassigned
to denote something else, and one forgets to delete it from the list.

Is there a better way?


Klaus Schilling