[Scheme-reports] Formal Comment: scope of #!fold-case and #!no-fold-case Richard Kelsey (27 Jun 2012 19:53 UTC)

[Scheme-reports] Formal Comment: scope of #!fold-case and #!no-fold-case Richard Kelsey 27 Jun 2012 19:53 UTC

Formal Comment

Submitter's name: Richard Kelsey
Submitter's email: kelsey at s48.org
Relevant draft: r7rs draft 6

Type: clarification
Priority: minor
Relevant section of draft: Lexical conventions

Summary: scope of #!fold-case and #!no-fold-case

The description of #!fold-case and #!no-fold-case says that they
change the behavior of the 'read' procedure.  I assume that this
doesn't mean that I can write things like:

  (define (case-folding-read)
    #!fold-case
    (read))

but it would be nice if the report made this clear.  Also, does
'load' pay attention to these?

I suggest that you drop the reference to 'read' and instead say
something like:

  These directives may appear anywhere comments are permitted (see
  section 2.2) and are treated as comments, except that they affect the
  reading of subsequent data from the same port.  The #!fold-case
  directive causes subsequent identifers and character names to be be
  case-folded (as if by string-foldcase; see section 6.7).  (It has no
  effect on character literals.)  The #!no-fold-case directive causes
  a return to the default, non-folding behavior.

_______________________________________________
Scheme-reports mailing list
Scheme-reports@scheme-reports.org
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports