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

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

[MIT-Scheme-users] associating environments with Scheme file buffers in


From: Chris Hanson
Subject: [MIT-Scheme-users] associating environments with Scheme file buffers in Edwin
Date: Wed, 14 Sep 2005 16:16:20 -0400
User-agent: IMAIL/1.21; Edwin/3.116; MIT-Scheme/7.7.90.+

   Date: Wed, 14 Sep 2005 05:36:05 +0000 (UTC)
   From: Taylor Campbell <address@hidden>

   Can you elaborate on the ideas you have?

There are a few principles I have in mind.  These seem to be almost
orthogonal to what you have been concerned about, though I'll have to
read your document more carefully and think about it.

* The primary function of the module system is to link code together,
  by associating names in different code fragments.

* Names are linked together by sharing a value cell.

* Top-level environments are an internal artifact of the module
  system.  They need not exist at run time, and the debugger may or
  may not choose to present them to the user.

* An "interface" is essentially an annotated set of names.  (See the
  attached document "modules.html".)  The annotation provides
  information about the values associated with the names, for the use
  of the compiler and other tools.

* A code fragment has an associated interface that is derived from the
  source code.  This interface can be transformed according to some
  simple rules (see "modules.html"), either by declarations in the
  source or externally.  The code fragment, along with its (possibly
  transformed) interface is an "implementation".

* Specification, transform, and other manipulations of interfaces are
  a function of the linker.  There should be a linking language that
  supports these activities.

Here is my quick take on your document:

(1) Simplicity & semantic cleanliness

        yes

(2) Environment control

        yes, in general, though I don't agree with the specifics

(3) Compilation control & macro semantics

        I see this as orthogonal to the problem of naming/linking

(4) Feature control/system distribution

        I don't entirely understand this one

(5) Interactive development

        yes

(6) Separation of interface from implementation

        yes

(7) Abstraction at the module level: parameterized modules

        umm, I think so.  But I'd probably deal with this by
        programming in the linking language.

(8) Mutual reference

        mutual reference is certainly required, but I'm not sure a
        theory is needed.

(9) Purely declarative language

        maybe.  I'd have to decide this one after playing with it for
        a while.

(10) Dynamic loading support

        yes

(11) Language generality & reader customization

        more or less.  the linker operates on binary objects, not
        source, so some of this is moot.

(12) OS-independence without OS-clashing

        yes

(13) File system interaction

        I don't have a problem with modules consisting only of whole
        files, as long as they can contain multiple files.  But since
        the linker deals with binary objects, that's a separable
        issue.  If the compiler wants to support multiple binaries
        froma single file, the linker doesn't need to know.

(14) No meta-modular complexity

        I don't understand this.

(15) Interaction with compiler optimization

        yes -- the nameset annotations provide that.

   Sorry, perhaps I ought to have clarified there: I was referring to a
   general -*- line parser for any Edwin library to utilize, not just one
   more specialized local variable (mode) that Edwin internally happens
   to recognize.  E.g., there might be a (DEFINE-*-LINE-HANDLER name
   procedure) procedure, with which one might implement the 'package' (or
   'environment') local variable like so: (DEFINE-*-LINE-HANDLER 'PACKAGE
   (LAMBDA (NAME BUFFER) (SET-VARIABLE! SCHEME-ENVIRONMENT NAME BUFFER)))

That sounds reasonable.

   Also, can you elaborate a little on the URI-based naming scheme you
   had in mind for the module system?  Having HTTP URLs name packages
   seems a little strange to me; I like the system of lists of names,
   but perhaps there's a more general reason.

I've been working on persistence in the context of web services.  I'd
like to have a naming structure that scales to shared "environments"
all over the world.

A name is a combination of an identifier and a set of properties. The properties provide additional information about the use of the identifier, such as the type of the value, or whether the value cell is read-only. One property is required, which specifies whether an identifier represents a syntactic keyword or a variable binding. All other properties are optional.

A nameset is a set of names in which no two names in the set have the same identifier. Namesets can be transformed in a few ways, as follows:


reply via email to

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