Next: Pre-Scheme type specifiers, Up: Pre-Scheme
Pre-Scheme is often considered either a dialect of Scheme or a subset of Scheme. However, there are several very important fundamental differences between the semantics of Pre-Scheme & Scheme to detail.
Lambda
expressions that would require full closures at run-time
— e.g., those whose values are stored in the heap — are not
permitted in Pre-Scheme. However, the Pre-Scheme compiler can hoist
many lambda
expressions to the top level, removing the need of
closures for them. (Closures would be much less useful in the absence
of garbage collection, in any case.) If the Pre-Scheme compiler is
unable to move a lambda
to a place where it requires no closure,
it signals an error to the user.
goto
special form (see Tail call optimization in Pre-Scheme), but, in situations where the compiler would not have
optimized the tail call, this can make the generated code have to jump
through many hoops to be a tail call — often necessitating code bloat,
because the code of the tail-called procedure is integrated into the
caller's driver loop —; and, where the compiler would have otherwise
optimized the tail call, goto
has no effect anyway.
call-with-current-continuation
or other continuation
manipulation interface. It has been suggested that downward-only
continuations, based on C's setjmp
& longjmp
, might be
implemented in the future, but this is not yet the case.1
long
type; flonums are
translated as the float
type.
vector-length
, are available only at
compile-time.
[1] It
may be possible to use Pre-Scheme's C FFI to manually use setjmp
& longjmp
, but the author of this manual cannot attest to this
working.