[Top][All Lists]

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

Re: [Chicken-users] Modules and environments

From: Thomas Chust
Subject: Re: [Chicken-users] Modules and environments
Date: Sun, 30 Aug 2009 19:20:33 +0200

2009/8/30 Peter Bex <address@hidden>:
> [...]
> If (print (environment-has-binding? (interaction-environment) 'hello))
> shows #f, then I would expect (eval '(hello) (interaction-environment))
> to fail, but it simply prints "hello".
> [...]


following your logic, the code

  (use environments)

    '(define-syntax hello (syntax-rules () [(hello) (print "hello")]))

    (environment-has-binding? (interaction-environment) 'hello))


should also fail in the fourth statement, since the third statement
prints #f ...

I don't think the behaviour of CHICKEN's module system is buggy here,
it's just not very intuitive.


All these theories, diverse as they are, have two things in common: They
explain the observed facts, and they are completely and utterly wrong.
                               -- Terry Pratchett, "The Light Fantastic"

reply via email to

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