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

Scoped syntax



As it turns out, T currently implements scoped syntax.  Locale-contours
introduce new syntax tables (in the terminology of the new manual).
It's not clear whether these two things should be decoupled; I think
that Sussman argues that they should be.  That is, there
should be separate constructs for creating new lexical environments
and for creating new syntax tables.  Semantically the two are
completely different and independent, and overloading LOCALE in
this way might be very misleading.

It's not completely clear to me just what the semantics of DEFINE-MACRO
should be.  For example, to what does

	(LET ((FOO (LAMBDA () 'THIS)))
	  (LOCALE ()
	    (BLOCK0 (FOO)
		    (DEFINE-MACRO (FOO) ''THAT))))

evaluate?

One almost wants to flush DEFINE-MACRO, which looks too much like a
side-effect (it isn't), and have something like

	(LET-SYNTAX-TABLE (AUGMENT-CURRENT-SYNTAX-TABLE
			   (MACRO (FOO) ''THAT)
			   (MACRO (BAR X) ...))
	  ... (FOO) ...)

which introduces new syntax tables in a functional way, but then it's
hard to come up with a syntax that's flexible and readable.

We're going to sit on this for a while, and do some experimentation.
We don't want to introduce gratuitous incompatibilities with MIT
SCHEME, and I don't think they've resolved these issues either.