Re: SRFI 105: Curly-infix-expressions Alan Manuel Gloria (26 Aug 2012 21:38 UTC)
Re: SRFI 105: Curly-infix-expressions John Cowan (26 Aug 2012 22:04 UTC)
Re: SRFI 105: Curly-infix-expressions Alan Manuel Gloria (26 Aug 2012 22:23 UTC)
Re: SRFI 105: Curly-infix-expressions John Cowan (26 Aug 2012 22:39 UTC)
Re: SRFI 105: Curly-infix-expressions David A. Wheeler (27 Aug 2012 00:04 UTC)
Re: SRFI 105: Curly-infix-expressions Alan Manuel Gloria (26 Aug 2012 22:11 UTC)

Re: SRFI 105: Curly-infix-expressions Alan Manuel Gloria 26 Aug 2012 22:11 UTC

> Those infix languages (and SRFI-105) also don't allow what I really
> want to write:
>
>   0 <= x < n

Note that this is more complex than that.

Consider the following code:

{ 0 <= (begin (display "foo!") x) < n }

The simple way to do this would be to translate it to:

{{ 0 <= (begin (display "foo!") x)} and { (begin (display "foo!") x) < n}}

But that will cause the side effects to occur twice if { 0 <= x }.

The correct translation would be:

 (let ((_some_var_ (begin (display "foo!") x)))
  {{ 0 <= _some_var_ } and { _some_var_ < n }})

And that's a lot of hidden complexity for the *reader* to do.

However, if an application writer or library writer wants to write that,
he or she is allowed to bind `nfx`, and is of course responsible
for the correct translation to the second form.

Sincerely,
AmkG