[r6rs-discuss] Question about "expand time" vs. "execution time"

From: Brian C. Barnes <bcbarnes>
Date: Mon, 28 May 2007 00:06:32 -0500

Ok, so I think I understand the "how" part of this. I still don't get the
"why" part. Is there an advantage to defining "expand time" vs. "run time"
this way? It seems somewhat restrictive, since, apparently, any binding that
is defined as a define-syntax is not a first-class procedure. In my
implementation, I have "not" defined with "define-syntax" but there are a
few test programs that want to pass "not" around as an argument. Is there a
list of "these things must not be defined as define-syntax things because
they need to be first-class procedures"?

Brian.

-----Original Message-----
From: John Cowan [mailto:cowan at ccil.org]
Sent: Sunday, May 27, 2007 20:38
To: Brian C. Barnes
Cc: r6rs-discuss at lists.r6rs.org
Subject: Re: [r6rs-discuss] Question about "expand time" vs. "execution
time"

Brian C. Barnes scripsit:

> (define-syntax ttf ...)
> (define ttf +)
>
> (ttf 5 3)
> (apply ttf (list ... ))
>
> Are these valid? Does "ttf" now refer to a macro, or to the "+" procedure?

The latter definition overrides the former, at least at the top level.

-- 
In politics, obedience and support      John Cowan <cowan at ccil.org>
are the same thing.  --Hannah Arendt    http://www.ccil.org/~cowan
Received on Mon May 28 2007 - 01:06:32 UTC

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