mit-scheme-users
[Top][All Lists]
Advanced

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

[MIT-Scheme-users] Re: [MIT-Scheme-devel] tied in knots with environment


From: Matt Birkholz
Subject: [MIT-Scheme-users] Re: [MIT-Scheme-devel] tied in knots with environments
Date: Mon, 31 Jan 2011 12:34:27 -0700

> From: Joe Marshall <address@hidden>
> Date: Mon, 31 Jan 2011 11:04:54 -0800
> 
> On Mon, Jan 31, 2011 at 12:51 AM, David Gray <address@hidden> wrote:
> > The pain is self induced but I can't see anyway round it. [...]
> 
> So there are three ways we can go:
>   1.  Why not avoid this dance with multiple environments?
>        (Simplest approach and recommended.)

I think Joe means this:

        (ge 'win32)     ;Get in the win32 environment and stay there!
        (define x '(1 2 3 4 5))
        (define (myadd list) (apply + list))
        (myadd x)
        And thus and to whither your muse leads you...

>   2.  Continue the dance and add the appropriate access calls:
>        ((access myadd (->environment '(win32))) x)
>        or
>        (ge 'win32)
>        (myadd (access x user-initial-environment))
> 
>        (This is rather advanced usage and not recommended.)
> 
>   3.  Use the `package' code to arrange for these identifiers
>        to be shared within different environments.  (highly advanced)

MANY good examples in the distribution.  The shortest of src/*/*.pkg
(by byte) is src/ffi/ffi.pkg.

Can we take the rest of this to MIT-Scheme-users?  I CCed us there.



reply via email to

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