[r6rs-discuss] [Formal] Relax ordering constraint on library bodies

From: John Cowan <cowan>
Date: Mon Jan 22 08:01:06 2007

---
This message is a formal comment which was submitted to formal-comment_at_r6rs.org, following the requirements described at: http://www.r6rs.org/process.html
---
Submitter: John Cowan
Email address: cowan_at_ccil.org
Issue type: Defect/Simplification
Priority: Major
Component: Libraries
Report version: 5.92
Summary: The ordering restriction on declarations and expressions in
library bodies should be relaxed.
Currently, library bodies are required to have declarations before
expressions as a matter of syntax.  The informal semantics in report
section 6.1 work fine whether this restriction is implemented or not,
and the formal semantics in report chapter 10 go to the trouble of
explaining that the syntactic restriction is not enforced there.
Relaxing this restriction enables the user to write code like this in
a library (it's already legal in a top-level program):
	(define foo ...)
	(install foo 'foo)
	(define bar ...)
	(install bar 'bar)
and even to generate these pairs of declarations and expressions by a
macro returning a begin form.  This seems to me a good and worthy thing
to be able to do.
Eliminating the distinction between library bodies and toplevel bodies
also allows a simplification in both description and understanding.
-- 
He played King Lear as though           John Cowan <cowan_at_ccil.org>
someone had played the ace.             http://www.ccil.org/~cowan
        --Eugene Field
Received on Sat Jan 20 2007 - 13:33:46 UTC

This archive was generated by hypermail 2.3.0 : Wed Oct 23 2024 - 09:15:01 UTC