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

Re: SRFI 105: Curly-infix-expressions



David A. Wheeler scripsit:

> Regarding "nfx": The reader returns a list with the "nfx" symbol in
> the front.  The user then decides what to do.  There's *NO* requirement
> that the result *EVER* be passed to eval, by the way; the user might
> have a completely different process for handling the result from read.
> This adds flexibility at little cost.

Quite so.  It should be mentioned that R6RS and R7RS systems cannot
reliably implement "nfx" as a procedure, because (in a rampant case of
ML-envy) there are no equality relations between procedures in those
standards.  Thus a procedure like this is not portable:

(define (test-plus f)
  (if (eqv? f +) "plus" "not plus"))

(test-plus +) => undefined

-- 
I Hope, Sir, that we are not                    John Cowan
mutually Un-friended by this                    cowan@xxxxxxxx
Difference which hath happened                  http://www.ccil.org/~cowan
betwixt us.     --Thomas Fuller, Appeal of Injured Innocence (1659)