[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Scheme-reports] Hardcoded identifier names in formal syntax
- To: Scheme Reports <scheme-reports@x>
- Subject: [Scheme-reports] Hardcoded identifier names in formal syntax
- From: Peter Bex <Peter.Bex@x>
- Date: Fri, 19 Aug 2011 16:53:03 +0200
- Mail-followup-to: Scheme Reports <scheme-reports@x>
I'd like to re-raise a point which I mentioned before, but which I think
got lost in the noise:
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:
(import (only scheme define display newline))
(define (letrec) 123)
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.
"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