Subject: Re: syntactic bindings as first-class values?
From: (Rob Warnock)
Date: 1997/08/20
Newsgroups: comp.lang.scheme
Message-ID: <5tdf2u$>

Jeffrey B. Siegal <> wrote:
| > You've just moved the problem around, that's all.
| > With your formulation, how is a predicate supposed
| > to *calculate* which of "#T" or "#F" to apply, hmmm?
| At some level predicates are always primitives... [which] can return
| the above "values" for #T and #F as easily as the conventional ones. 
| You still need primitives, but you don't need any special _syntax_ for IF.

However, this breaks R4RS, since it allows the expression
(and (boolean? x) (procedure? x)) to be true of predicate values.
That's why I didn't propose using "0" & "1" as in C, with the
"if" macro expanding into:

	((vector-ref #((lambda (x y) (y)) (lambda (x y) (x))) <predicate>)
	 <true thunk>
	 <false thunk>)

This requires (and (boolean? x) (number? x)), which also breaks R4RS.


p.s. The lightweight "SIOD" Scheme gets much of its lightness from
flattening the numeric tower (e.g., all numbers are floats, chars are
just small numbers, etc.), which does lead to some portability problems
when moving back & forth between SIOD & R4RS Schemes...

Rob Warnock, 7L-551
Silicon Graphics, Inc.		Phone: 650-933-1673 [New area code!]
2011 N. Shoreline Blvd.		FAX: 650-933-4392
Mountain View, CA  94043	PP-ASEL-IA