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

[Scheme-reports] Hardcoded identifier names in formal syntax



Hi,

I'd like to re-raise a point which I mentioned before, but which I think
got lost in the noise:
http://lists.scheme-reports.org/pipermail/scheme-reports/2011-April/000390.html

In R7RS's formal syntax (chapter 7) there are many productions (mainly
under <derived-expression>) which include hardcoded "constant names" like
COND, DEFINE, CASE-LAMBDA etc.  I don't understand why this is neccessary
or even desirable.

If taken literally (how else should one take a formal syntax?), I think
this module would raise a syntax error at read time because the letrec
doesn't conform to the prescribed syntax:

(module (foo)
  (import (only scheme define display newline))

  (define (letrec) 123)
  (display (letrec))
  (newline))

Having modules really changes the Scheme language to be much less easily
analyzed statically, and I'm not sure syntactic forms should even be part
of the formal syntax like they are now.

They're more like a "syntactic library" over a handful of underlying
core forms which are not necessarily part of the standard.  Incidentally,
that's how many Schemes are implemented AFAIK.  There's a great deal of
overlap between these core forms and the syntactic forms in the RnRS
languages but that doesn't *have* to be the case.

Cheers,
Peter
-- 
http://sjamaan.ath.cx
--
"The process of preparing programs for a digital computer
 is especially attractive, not only because it can be economically
 and scientifically rewarding, but also because it can be an aesthetic
 experience much like composing poetry or music."
							-- Donald Knuth

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