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

Re: changes to the design of SRFI-26 "Notation for specializing parameters without currying"

Here are two belated bug reports on the previous draft:

1. "petrovsky" => "petrofsky".

2. The use of (cut "loop" vars proc proc-args . cut-args) in the
   reference implementation causes some uses of cut to fail even
   though the spec for cut indicates that they should succeed, because
   "loop" is a valid expression.  You could fix this by changing the
   marker to some non-expression datum like (), #(), or #(loop).

   Alternatively, bind a top-level identifier like srfi26-internal-cut
   to the internal version.  Then the cut macro would no longer suffer
   the misfeature of allowing ill-formed uses just because they happen
   to match its internals.


P.S.  The real solution here is that the syntax for transformers
should be extended to allow (let-syntax <bindings> <transformer>) as a
valid transformer, with the obvious semantics, and then you could

  (define-syntax cut
	  (syntax-rules (<> <...>)
	    ;; rules
      (syntax-rules ()
        ((cut . args) (internal-cut () () . args)))))

but that's the subject of a different SRFI.