Final SRFI 156: Syntactic combiners for binary predicates
Arthur A. Gleckler 18 Dec 2017 23:16 UTC
Scheme Request for Implementation 156,
"Syntactic combiners for binary predicates,"
by Panicz Maciej Godek,
has gone into "final" status.
The document and an archive of the discussion are available
at <https://srfi.schemers.org/srfi-156/>.
Here's the abstract:
Recognizing binary predicates as a specific area in which
the use of prefix operators is an impediment, we propose a
thin layer of "syntactic stevia" for in-fixing such
predicates. It can be implemented using regular Scheme
macros. We suggest that the code (is x < y) should be
transformed to (< x y), and (is x < y <= z) -- to (let ((y*
y)) (and (< x y*) (<= y* z))). In addition, we suggest
special meaning to the _ symbol: (is _ < y) and (is x < _)
should be transformed to (lambda (_) (< _ y)) and (lambda
(_) (< x _)), respectively. This SRFI document anlso
describes some other uses of the is macro and its
limitations.
Note that tests are now included in the reference
implementation. They can be seen in the diff from the
previous draft:
<https://github.com/scheme-requests-for-implementation/srfi-156/compare/031fda82658657deb73e06d017e670c9889cad47...f6ffabba1639338f091b0413422a03b18a7bae68>
Regards,
SRFI Editor