Re: SRFI 105: Curly-infix-expressions John Cowan 27 Aug 2012 16:14 UTC

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                    xxxxxx@ccil.org
Difference which hath happened                  http://www.ccil.org/~cowan
betwixt us.     --Thomas Fuller, Appeal of Injured Innocence (1659)