This is the mail archive of the
guile@sourceware.cygnus.com
mailing list for the Guile project.
Re: Trouble understanding define (!)
- To: Michael Livshin <mlivshin at bigfoot dot com>
- Subject: Re: Trouble understanding define (!)
- From: Jost Boekemeier <jostobfe at linux dot zrz dot TU-Berlin dot DE>
- Date: 02 Feb 2000 12:34:26 +0100
- Cc: Mikael Djurfeldt <mdj at mdj dot nada dot kth dot se>, Neil Jerram <neil at ossau dot uklinux dot net>, guile at sourceware dot cygnus dot com, djurfeldt at nada dot kth dot se
- References: <200001142054.UAA00622@ossau> <p2tzou4o5ov.fsf@pampelmuse.zrz.tu-berlin.de> <200001182250.WAA00624@ossau> <xy7ya9nezzz.fsf@mdj.nada.kth.se> <200001221200.MAA00478@ossau> <xy7bt6e82ru.fsf@mdj.nada.kth.se> <s3zotxrqoz.fsf@verisity.com> <xy7iu0cbc1z.fsf@mdj.nada.kth.se> <s3iu0bq1x5.fsf@verisity.com> <xy71z6z35os.fsf@mdj.nada.kth.se> <s33drfpm9d.fsf@verisity.com> <xy73drec8ap.fsf@mdj.nada.kth.se> <xy7oga1or3w.fsf@mdj.nada.kth.se> <s3snzdcc5y.fsf@verisity.com> <p2t3drdgihz.fsf@pampelmuse.zrz.tu-berlin.de> <s3oga1cagq.fsf@verisity.com>
Michael Livshin <mlivshin@bigfoot.com> writes:
> (define-generic NAME ...) defines NAME in the global module, but noone
> stops you from saying
> (define NAME (make-generic ...)) and having it in your preferred
> scope. or (define-extended-generic NAME #:imports OTHER) as Neil
> suggested, to extend other generic without changing it.
Hmm.
As I understand it for a module M´ inheriting from M there is a
generic G (fixme: G or G´?) which holds the methods that M´ exports.
A module M[I,J] which imports I and J must create a new generic GIJ
which imports I and J. Yes?
Both G+ (== GIJ) and M+ (== M[I,J]) are modules and handle feature
renaming as usual, yes?
> and all that this requires from the module system is that it provide
> such a magic module (which could be useful for other things, although
> I can't think of any right now). what's good is that the module
> system doesn't have to bend over backwards to support generics.
It isn´t really a "magic" module. The meta-module (currently called
config-environment) is simply the the module which exports all
modules. It represents the current state of the system. It also
holds the load-path for example and other environment variables, for
example $GUILE_HOME.
Jost
--
PS: About "parametric modules": Do you know a dedicated QUAKE
server where we can discuss this issue? :))