summaryrefslogtreecommitdiff
path: root/doc/ref/api-macros.texi
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2017-05-22 15:36:28 +0200
committerAndy Wingo <wingo@pobox.com>2017-05-22 15:37:43 +0200
commit1f560bc4b7d1116d678c82f781b2c9259d20c59d (patch)
treeaf4439bfdbd5e92720db2802387b61ee0869c5e6 /doc/ref/api-macros.texi
parentb2c0e01bb48bea1876e8cb26e0f5ffac17069e9d (diff)
downloadguile-1f560bc4b7d1116d678c82f781b2c9259d20c59d.tar.gz
Remove support for legacy syntax objects.
* module/ice-9/psyntax.scm: Remove support for legacy syntax objects. * module/ice-9/psyntax-pp.scm: Regenerate. * module/ice-9/deprecated.scm (allow-legacy-syntax-objects?): New deprecation. * module/ice-9/boot-9.scm: Don't define allow-legacy-syntax-objects?. * doc/ref/api-macros.texi: Remove documentation for allow-legacy-syntax-objects?.
Diffstat (limited to 'doc/ref/api-macros.texi')
-rw-r--r--doc/ref/api-macros.texi38
1 files changed, 0 insertions, 38 deletions
diff --git a/doc/ref/api-macros.texi b/doc/ref/api-macros.texi
index 7fa62e3d6..ef0621415 100644
--- a/doc/ref/api-macros.texi
+++ b/doc/ref/api-macros.texi
@@ -791,44 +791,6 @@ Return the source properties that correspond to the syntax object
@var{x}. @xref{Source Properties}, for more information.
@end deffn
-And now, a bit of confession time. Guile's syntax expander originates
-in code from Chez Scheme: a version of the expander in Chez Scheme that
-was made portable to other Scheme systems. Way back in the mid-1990s,
-some Scheme systems didn't even have the ability to define new abstract
-data types. For this reason, the portable expander from Chez Scheme
-that Guile inherited used tagged vectors as syntax objects: vectors
-whose first element was the symbol, @code{syntax-object}.
-
-At the time of this writing it is 2017 and Guile still has support for
-this strategy. It worked for this long because no one ever puts a
-literal vector in the operator position:
-
-@example
-(#(syntax-object ...) 1 2 3)
-@end example
-
-But this state of affairs was an error. Because syntax objects are just
-vectors, this makes it possible for any Scheme code to forge a syntax
-object which might cause it to violate abstraction boundaries. You
-can't build a sandboxing facility that limits the set of bindings in
-scope when one can always escape that limit just by evaluating a special
-vector. To fix this problem, Guile 2.2.1 finally migrated to represent
-syntax objects as a distinct type with a distinct constructor that is
-unavailable to user code.
-
-However, Guile still has to support ``legacy'' syntax objects, because
-it could be that a file compiled with Guile 2.2.0 embeds syntax objects
-of the vector kind. Whether the expander treats the special tagged
-vectors as syntax objects is now controllable by the
-@code{allow-legacy-syntax-objects?} parameter:
-
-@deffn {Scheme Procedure} allow-legacy-syntax-objects?
-A parameter that indicates whether the expander should support legacy
-syntax objects, as described above. For ABI stability reasons, the
-default is @code{#t}. Use @code{parameterize} to bind it to @code{#f}.
-@xref{Parameters}.
-@end deffn
-
Guile also offers some more experimental interfaces in a separate
module. As was the case with the Large Hadron Collider, it is unclear
to our senior macrologists whether adding these interfaces will result