commit 83cc3afa90029ad99fd8dc193e4b05adc84c523b
parent 901dd89f4d3b8ca8f8e3367f61428b1091bb6273
Author: Wolfgang Corcoran-Mathe <wcm@sigwinch.xyz>
Date: Tue, 6 Feb 2024 23:22:18 -0500
Languages changes: Reflow.
Diffstat:
1 file changed, 176 insertions(+), 165 deletions(-)
diff --git a/doc/r7rs-small/language-changes.texinfo b/doc/r7rs-small/language-changes.texinfo
@@ -10,36 +10,40 @@
@node Incompatibilities with R5RS
@section Incompatibilities with @rfivers{}
-This section enumerates the incompatibilities between this report and the ``Revised@sup{5}
-report'' [20].
+This section enumerates the incompatibilities between this report and
+the ``Revised@sup{5} report'' [20].
-This list is not authoritative, but is believed to be correct and complete.
+This list is not authoritative, but is believed to be correct and
+complete.
@itemize @bullet
@item
Case sensitivity is now the default in symbols and character names.
This means that code written under the assumption that symbols could be
-written @code{FOO} or @code{Foo} in some contexts and @code{foo} in other contexts
-can either be changed, be marked with the new @code{#!fold-case} directive,
-or be included in a library using the @code{include-ci} library declaration.
-All standard identifiers are entirely in lower case.
+written @code{FOO} or @code{Foo} in some contexts and @code{foo} in
+other contexts can either be changed, be marked with the new
+@code{#!fold-case} directive, or be included in a library using the
+@code{include-ci} library declaration. All standard identifiers are
+entirely in lower case.
@item
The @code{syntax-rules} construct now recognizes @code{_} (underscore)
-as a wildcard, which means it cannot be used as a syntax variable.
-It can still be used as a literal.
+as a wildcard, which means it cannot be used as a syntax variable. It
+can still be used as a literal.
@item
-The @rfivers{} procedures @code{exact->inexact} and @code{inexact->exact}
-have been renamed to their @rsixrs{} names, @code{inexact} and @code{exact},
-respectively, as these names are shorter and more correct.
-The former names are still available in the @rfivers{} library.
+The @rfivers{} procedures @code{exact->inexact} and
+@code{inexact->exact} have been renamed to their @rsixrs{} names,
+@code{inexact} and @code{exact}, respectively, as these names are
+shorter and more correct. The former names are still available in the
+@rfivers{} library.
@item
The guarantee that string comparison (with @code{string<?} and the
-related predicates) is a lexicographical extension of character comparison
-(with @code{char<?} and the related predicates) has been removed.
+related predicates) is a lexicographical extension of character
+comparison (with @code{char<?} and the related predicates) has been
+removed.
@item
Support for the # character in numeric literals is no longer required.
@@ -49,52 +53,55 @@ Support for the letters @code{s}, @code{f}, @code{d}, and @code{l}
as exponent markers is no longer required.
@item
-Implementations of @code{string->number} are no longer permitted
-to return @code{#f} when the argument contains an explicit radix prefix,
-and must be compatible with @code{read} and the syntax of numbers in programs.
+Implementations of @code{string->number} are no longer permitted to
+return @code{#f} when the argument contains an explicit radix prefix,
+and must be compatible with @code{read} and the syntax of numbers in
+programs.
@item
-The procedures @code{transcript-on} and @code{transcript-off} have been removed.
+The procedures @code{transcript-on} and @code{transcript-off} have been
+removed.
@end itemize
@node Other language changes since R5RS
@section Other language changes since @rfivers{}
-This section enumerates the additional differences between this report and the ``Revised5
-report'' [20].
+This section enumerates the additional differences between this report
+and the ``Revised5 report'' [20].
-This list is not authoritative, but is believed to be correct and complete.
+This list is not authoritative, but is believed to be correct and
+complete.
@itemize @bullet
@item
-Various minor ambiguities and unclarities in @rfivers{} have been cleaned up.
+Various minor ambiguities and unclarities in @rfivers{} have been
+cleaned up.
@item
Libraries have been added as a new program structure to improve
-encapsulation and sharing of code. Some existing and new identifiers
-have been factored out into separate libraries.
-Libraries can be imported into other libraries or main programs, with
-controlled exposure and renaming of identifiers.
-The contents of a library can be made conditional on the features of
-the implementation on which it is to be used.
-There is an @rfivers{} compatibility library.
+encapsulation and sharing of code. Some existing and new identifiers
+have been factored out into separate libraries. Libraries can be
+imported into other libraries or main programs, with controlled
+exposure and renaming of identifiers. The contents of a library can be
+made conditional on the features of the implementation on which it is
+to be used. There is an @rfivers{} compatibility library.
@item
-The expressions types @code{include}, @code{include-ci}, and @code{cond-expand}
-have been added to the base library; they have the same semantics as the
-corresponding library declarations.
+The expressions types @code{include}, @code{include-ci}, and
+@code{cond-expand} have been added to the base library; they have the
+same semantics as the corresponding library declarations.
@item
Exceptions can now be signaled explicitly with @code{raise},
@code{raise-continuable} or @code{error}, and can be handled with
-@code{with-exception-handler} and the @code{guard} syntax.
-Any object can specify an error condition; the implementation-defined
-conditions signaled by @code{error} have a predicate to detect them and accessor functions to
-retrieve the arguments passed to @code{error}.
-Conditions signaled by @code{read} and by file-related procedures
-also have predicates to detect them.
+@code{with-exception-handler} and the @code{guard} syntax. Any object
+can specify an error condition; the implementation-defined conditions
+signaled by @code{error} have a predicate to detect them and accessor
+functions to retrieve the arguments passed to @code{error}. Conditions
+signaled by @code{read} and by file-related procedures also have
+predicates to detect them.
@item
New disjoint types supporting access to multiple fields can be
@@ -103,75 +110,75 @@ generated with the @code{define-record-type} of SRFI 9.
@item
Parameter objects can be created with @code{make-parameter}, and
-dynamically rebound with @code{parameterize}.
-The procedures @code{current-input-port} and @code{current-output-port} are now
-parameter objects, as is the newly introduced @code{current-error-port}.
+dynamically rebound with @code{parameterize}. The procedures
+@code{current-input-port} and @code{current-output-port} are now
+parameter objects, as is the newly introduced
+@code{current-error-port}.
@item
Support for promises has been enhanced based on SRFI 45.
@c cite{srfi45}.
@item
-Bytevectors, vectors of exact integers in the range
-from 0 to 255 inclusive, have been added as a new disjoint type.
-A subset of the vector procedures is provided. Bytevectors
-can be converted to and from strings in accordance with the UTF-8 character encoding.
-Bytevectors have a datum representation and evaluate to themselves.
+Bytevectors, vectors of exact integers in the range from 0 to 255
+inclusive, have been added as a new disjoint type. A subset of the
+vector procedures is provided. Bytevectors can be converted to and from
+strings in accordance with the UTF-8 character encoding. Bytevectors
+have a datum representation and evaluate to themselves.
@item
Vector constants evaluate to themselves.
@item
-The procedure @code{read-line} is provided to make line-oriented textual input
-simpler.
+The procedure @code{read-line} is provided to make line-oriented
+textual input simpler.
@item
The procedure @code{flush-output-port} is provided to allow minimal
control of output port buffering.
@item
-Ports can now be designated as textual or
-binary ports, with new procedures for reading and writing binary
-data.
-The new predicates @code{input-port-open?} and @code{output-port-open?} return whether a port is open or closed.
-The new procedure @code{close-port} now closes a port; if the port
-has both input and output sides, both are closed.
+Ports can now be designated as textual or binary ports, with new
+procedures for reading and writing binary data. The new predicates
+@code{input-port-open?} and @code{output-port-open?} return whether a
+port is open or closed. The new procedure @code{close-port} now closes
+a port; if the port has both input and output sides, both are closed.
@item
-String ports have been added as a way to read and write
-characters to and from strings, and bytevector ports to read
-and write bytes to and from bytevectors.
+String ports have been added as a way to read and write characters to
+and from strings, and bytevector ports to read and write bytes to and
+from bytevectors.
@item
There are now I/O procedures specific to strings and bytevectors.
@item
The @code{write} procedure now generates datum labels when applied to
-circular objects. The new procedure @code{write-simple} never generates
-labels; @code{write-shared} generates labels for all shared and circular
-structure.
-The @code{display} procedure must not loop on circular objects.
+circular objects. The new procedure @code{write-simple} never generates
+labels; @code{write-shared} generates labels for all shared and
+circular structure. The @code{display} procedure must not loop on
+circular objects.
@item
-The @rsixrs{} procedure @code{eof-object} has been added.
-Eof-objects are now required to be a disjoint type.
+The @rsixrs{} procedure @code{eof-object} has been added. Eof-objects
+are now required to be a disjoint type.
@item
Syntax definitions are now allowed wherever variable definitions are.
@item
-The @code{syntax-rules} construct now allows
-the ellipsis symbol to be specified explicitly instead of the default
-@code{@dots{}}, allows template escapes with an ellipsis-prefixed list, and
-allows tail patterns to follow an ellipsis pattern.
+The @code{syntax-rules} construct now allows the ellipsis symbol to be
+specified explicitly instead of the default @code{@dots{}}, allows
+template escapes with an ellipsis-prefixed list, and allows tail
+patterns to follow an ellipsis pattern.
@item
-The @code{syntax-error} syntax has been added as a way to signal immediate
-and more informative errors when a macro is expanded.
+The @code{syntax-error} syntax has been added as a way to signal
+immediate and more informative errors when a macro is expanded.
@item
-The @code{letrec*} binding construct has been added, and internal @code{define}
-is specified in terms of it.
+The @code{letrec*} binding construct has been added, and internal
+@code{define} is specified in terms of it.
@item
Support for capturing multiple values has been enhanced with
@@ -181,16 +188,17 @@ permit passing zero or more than one value to the continuations of all
non-final expressions of the sequence.
@item
-The @code{case} conditional now supports @code{=>} syntax
-analogous to @code{cond} not only in regular clauses but in the
-@code{else} clause as well.
+The @code{case} conditional now supports @code{=>} syntax analogous to
+@code{cond} not only in regular clauses but in the @code{else} clause
+as well.
@item
To support dispatching on the number of arguments passed to a
procedure, @code{case-lambda} has been added in its own library.
@item
-The convenience conditionals @code{when} and @code{unless} have been added.
+The convenience conditionals @code{when} and @code{unless} have been
+added.
@item
The behavior of @code{eqv?} on inexact numbers now conforms to the
@@ -201,26 +209,27 @@ When applied to procedures, @code{eq?} and @code{eqv?} are permitted to
return different answers.
@item
-The @rsixrs{} procedures @code{boolean=?} and @code{symbol=?} have been added.
+The @rsixrs{} procedures @code{boolean=?} and @code{symbol=?} have been
+added.
@item
-Positive infinity, negative infinity, NaN, and negative inexact zero have been added
-to the numeric tower as inexact values with the written
-representations @code{+inf.0}, @code{-inf.0}, @code{+nan.0}, and @code{-0.0}
-respectively. Support for them is not required.
-The representation @code{-nan.0} is synonymous with @code{+nan.0}.
+Positive infinity, negative infinity, NaN, and negative inexact zero
+have been added to the numeric tower as inexact values with the written
+representations @code{+inf.0}, @code{-inf.0}, @code{+nan.0}, and
+@code{-0.0} respectively. Support for them is not required. The
+representation @code{-nan.0} is synonymous with @code{+nan.0}.
@item
The @code{log} procedure now accepts a second argument specifying
the logarithm base.
@item
-The procedures @code{map} and @code{for-each} are now required to terminate on
-the shortest argument list.
+The procedures @code{map} and @code{for-each} are now required to
+terminate on the shortest argument list.
@item
-The procedures @code{member} and @code{assoc} now take an optional third argument
-specifying the equality predicate to be used.
+The procedures @code{member} and @code{assoc} now take an optional
+third argument specifying the equality predicate to be used.
@item
The numeric procedures @code{finite?}, @code{infinite?}, @code{nan?},
@@ -228,62 +237,60 @@ The numeric procedures @code{finite?}, @code{infinite?}, @code{nan?},
have been added.
@item
-The @code{-} and @code{/} procedures
-and the character and string comparison
-predicates are now required to support more than two arguments.
+The @code{-} and @code{/} procedures and the character and string
+comparison predicates are now required to support more than two
+arguments.
@item
-The forms @code{#true} and @code{#false} are now supported
-as well as @code{#t} and @code{#f}.
+The forms @code{#true} and @code{#false} are now supported as well as
+@code{#t} and @code{#f}.
@item
+
The procedures @code{make-list}, @code{list-copy}, @code{list-set!},
@code{string-map}, @code{string-for-each}, @code{string->vector},
-@code{vector-append},
-@code{vector-copy}, @code{vector-map}, @code{vector-for-each},
-@code{vector->string}, @code{vector-copy!}, and @code{string-copy!}
-have been added to round out the sequence operations.
+@code{vector-append}, @code{vector-copy}, @code{vector-map},
+@code{vector-for-each}, @code{vector->string}, @code{vector-copy!}, and
+@code{string-copy!} have been added to round out the sequence
+operations.
@item
-Some string and vector procedures support processing of part of a string or vector using
-optional @var{start} and @var{end} arguments.
+Some string and vector procedures support processing of part of a
+string or vector using optional @var{start} and @var{end} arguments.
@item
Some list procedures are now defined on circular lists.
@item
-Implementations may provide any subset of the full Unicode
-repertoire that includes ASCII, but implementations must support any
-such subset in a way consistent with Unicode.
-Various character and string procedures have been extended accordingly,
-and case conversion procedures added for strings.
-String comparison is no longer
-required to be consistent with character comparison, which is based
-solely on Unicode scalar values.
-The new @code{digit-value} procedure has been added to obtain the numerical
-value of a numeric character.
+Implementations may provide any subset of the full Unicode repertoire
+that includes ASCII, but implementations must support any such subset
+in a way consistent with Unicode. Various character and string
+procedures have been extended accordingly, and case conversion
+procedures added for strings. String comparison is no longer required
+to be consistent with character comparison, which is based solely on
+Unicode scalar values. The new @code{digit-value} procedure has been
+added to obtain the numerical value of a numeric character.
@item
-There are now two additional comment syntaxes: @code{#;} to
-skip the next datum, and @code{#|} ... @code{|#}
-for nestable block comments.
+There are now two additional comment syntaxes: @code{#;} to skip the
+next datum, and @code{#|} ... @code{|#} for nestable block comments.
@item
-Data prefixed with datum labels @code{#<}@var{n}@code{>=} can be referenced
-with @code{#<}@var{n}@code{>#}, allowing for reading and writing of data with
-shared structure.
+Data prefixed with datum labels @code{#<}@var{n}@code{>=} can be
+referenced with @code{#<}@var{n}@code{>#}, allowing for reading and
+writing of data with shared structure.
@item
-Strings and symbols now allow mnemonic and numeric escape
-sequences, and the list of named characters has been extended.
+Strings and symbols now allow mnemonic and numeric escape sequences,
+and the list of named characters has been extended.
@item
-The procedures @code{file-exists?} and @code{delete-file} are available in the
-@code{(scheme file)} library.
+The procedures @code{file-exists?} and @code{delete-file} are available
+in the @code{(scheme file)} library.
@item
-An interface to the system environment, command line, and process exit status is
-available in the @code{(scheme process-context)} library.
+An interface to the system environment, command line, and process exit
+status is available in the @code{(scheme process-context)} library.
@item
Procedures for accessing time-related values are available in the
@@ -294,8 +301,8 @@ A less irregular set of integer division operators is provided
with new and clearer names.
@item
-The @code{load} procedure now accepts a second argument specifying the environment to
-load into.
+The @code{load} procedure now accepts a second argument specifying the
+environment to load into.
@item
The @code{call-with-current-continuation} procedure now has the synonym
@@ -303,7 +310,8 @@ The @code{call-with-current-continuation} procedure now has the synonym
@item
The semantics of read-eval-print loops are now partly prescribed,
-requiring the redefinition of procedures, but not syntax keywords, to have retroactive effect.
+requiring the redefinition of procedures, but not syntax keywords, to
+have retroactive effect.
@item
The formal semantics now handles @code{dynamic-wind}.
@@ -320,68 +328,71 @@ This list is not authoritative, and is possibly incomplete.
@item
@rsevenrs{} libraries begin with the keyword @code{define-library}
rather than @code{library} in order to make them syntactically
-distinguishable from @rsixrs{} libraries.
-In @rsevenrs{} terms, the body of an @rsixrs{} library consists
-of a single export declaration followed by a single import declaration,
-followed by commands and definitions. In @rsevenrs, commands and
-definitions are not permitted directly within the body: they have to be be wrapped in a @code{begin}
+distinguishable from @rsixrs{} libraries. In @rsevenrs{} terms, the
+body of an @rsixrs{} library consists of a single export declaration
+followed by a single import declaration, followed by commands and
+definitions. In @rsevenrs, commands and definitions are not permitted
+directly within the body: they have to be be wrapped in a @code{begin}
library declaration.
@item
-There is no direct @rsixrs{} equivalent of the @code{include}, @code{include-ci},
-@code{include-library-declarations}, or @code{cond-expand} library declarations.
-On the other hand, the @rsevenrs{} library syntax does not support phase or version specifications.
+There is no direct @rsixrs{} equivalent of the @code{include},
+@code{include-ci}, @code{include-library-declarations}, or
+@code{cond-expand} library declarations. On the other hand, the
+@rsevenrs{} library syntax does not support phase or version
+specifications.
@item
-The grouping of standardized identifiers into libraries is different from the @rsixrs{}
-approach. In particular, procedures which are optional in @rfivers{}, either expressly
-or by implication, have been removed from the base library.
-Only the base library itself is an absolute requirement.
+The grouping of standardized identifiers into libraries is different
+from the @rsixrs{} approach. In particular, procedures which are
+optional in @rfivers{}, either expressly or by implication, have been
+removed from the base library. Only the base library itself is an
+absolute requirement.
@item
No form of identifier syntax is provided.
@item
Internal syntax definitions are allowed, but uses of a syntax form
-cannot appear before its definition; the @code{even}/@code{odd} example given in
-@rsixrs{} is not allowed.
+cannot appear before its definition; the @code{even}/@code{odd} example
+given in @rsixrs{} is not allowed.
@item
-The @rsixrs{} exception system was incorporated as-is, but the condition
-types have been left unspecified. In particular, where @rsixrs{} requires
-a condition of a specified type to be signaled, @rsevenrs{} says only
-``it is an error'', leaving the question of signaling open.
+The @rsixrs{} exception system was incorporated as-is, but the
+condition types have been left unspecified. In particular, where
+@rsixrs{} requires a condition of a specified type to be signaled,
+@rsevenrs{} says only ``it is an error'', leaving the question of
+signaling open.
@item
-Full Unicode support is not required.
-Normalization is not provided.
-Character comparisons are
-defined by Unicode, but string comparisons are implementation-dependent.
-Non-Unicode characters are permitted.
+Full Unicode support is not required. Normalization is not provided.
+Character comparisons are defined by Unicode, but string comparisons
+are implementation-dependent. Non-Unicode characters are permitted.
@item
-The full numeric tower is optional as in @rfivers{}, but optional support for IEEE
-infinities, NaN, and @minus{}0.0 was adopted from @rsixrs. Most clarifications on
-numeric results were also adopted, but the @rsixrs{} procedures @code{real-valued?},
-@code{rational-valued?}, and @code{integer-valued}? were not.
-The @rsixrs{} division operators @code{div}, @code{mod}, @code{div-and-mod},
-@code{div0}, @code{mod0} and @code{div0-and-mod0} are not provided.
+The full numeric tower is optional as in @rfivers{}, but optional
+support for IEEE infinities, NaN, and @minus{}0.0 was adopted from
+@rsixrs. Most clarifications on numeric results were also adopted, but
+the @rsixrs{} procedures @code{real-valued?}, @code{rational-valued?},
+and @code{integer-valued}? were not. The @rsixrs{} division operators
+@code{div}, @code{mod}, @code{div-and-mod}, @code{div0}, @code{mod0}
+and @code{div0-and-mod0} are not provided.
@item
-When a result is unspecified, it is still required to be a single value.
-However, non-final expressions
-in a body can return any number of values.
+When a result is unspecified, it is still required to be a single
+value. However, non-final expressions in a body can return any number
+of values.
@item
-The semantics of @code{map} and @code{for-each} have been changed to use
-the SRFI 1 early termination behavior. Likewise,
-@code{assoc} and @code{member} take an optional @code{equal?} argument as in SRFI 1,
-instead of the separate @code{assp} and @code{memp} procedures of @rsixrs{}.
-@c cite{srfi1}
+The semantics of @code{map} and @code{for-each} have been changed to
+use the SRFI 1 early termination behavior. Likewise, @code{assoc} and
+@code{member} take an optional @code{equal?} argument as in SRFI 1,
+instead of the separate @code{assp} and @code{memp} procedures of
+@rsixrs{}. @c cite{srfi1}
@item
-The @rsixrs{} @code{quasiquote} clarifications have been adopted, with the
-exception of multiple-argument @code{unquote} and
+The @rsixrs{} @code{quasiquote} clarifications have been adopted, with
+the exception of multiple-argument @code{unquote} and
@code{unquote-splicing}.
@item
@@ -392,10 +403,10 @@ String ports are compatible with SRFI 6 rather than @rsixrs{}.
@c cite{srfi6}
@item
-@rsixrs{}-style bytevectors are included, but
-only the unsigned byte (@code{u8}) procedures have been provided.
-The lexical syntax uses @code{#u8} for compatibility
-with SRFI 4, rather than the @rsixrs{} @code{#vu8} style.
+@rsixrs{}-style bytevectors are included, but only the unsigned byte
+(@code{u8}) procedures have been provided. The lexical syntax uses
+@code{#u8} for compatibility with SRFI 4, rather than the @rsixrs{}
+@code{#vu8} style.
@c cite{srfi4}
@item