chicken-users
[Top][All Lists]
Advanced

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

[Chicken-users] Environments as Modules


From: George Rogers
Subject: [Chicken-users] Environments as Modules
Date: Wed, 23 Mar 2011 20:36:04 -0400 (EDT)

What do you think about using evaluation environments as a basis for a module system. I was thinking syntax like this

(define-module foo)
(using foo
  (define (baz x)
    (+ x x))
  (define-syntax (bar stx)
    (cdr stx)))

(define-module bar)
(using bar
  (include foo)
  (display (bar (baz 10)))) ;; Prints 20
(baz 100) => fails


Wouldn't this be the most scheme like module system possible.

reply via email to

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