2017-07-28 12:17 GMT+02:00 Panicz Maciej Godek <xxxxxx@gmail.com>:


So anyway, I include a *broken* implementation that was meant to support underscore
in any position, but apparently doesn't support underscore at all. If you were willing
to help me with that, I'd be grateful.

For the record, I did receive suggestions from Mark that allowed me
to implement a variant of SRFI-156 which allows placeholders in the
position of any argument to "is" and "isnt" macros, that I enclose
in the attachment. In addition, it also allows to use more than one
placeholder, where each occurrence stands for a distinct argument to lambda.

It makes me worried, because the implementation now became
very abstract, and it no longer conveys the intent: it doesn't tell
the reader how the "is" macro is meant to be used, which I think
is a big price to pay -- especially given that the behavior that it enables
is questionable and discouraged and unlikely to be used in practice:
I expect specialization of a single argument of a binary predicate
to be the most common use case, which in my view justifies
the irregular behavior.

It also prompts to consider another interpretation, where "is" would always
be returning a lambda, and so instead of (is x < y), one would need to
write ((is x < y)). I don't think there's any utility in such consistence,
but I'm mentioning it for consideration.