Arc Forumnew | comments | leaders | submitlogin
1 point by sacado 6184 days ago | link | parent

Actually, you already can.

First, mzscheme lets you use this syntax :

(a . + . (b . + . c))

Well, I find it ugly and hard to type (that's about 20 characters, instead of about 10), but that's a question of point of view, and at least you can do that.

There was also an experimental version of infix notation for numerical operations on Anarki a few time ago. You could do :

(a + b + c)

However, the implementation was very slow, so I think it is not used by many of us those days.



2 points by eds 6183 days ago | link

> However, the implementation was very slow, so I think it is not used by many of us those days.

I'd like to find a way to improve the speed of the current infix implementation, but I'm not sure it can be done without using macros, which would require some sort of type inferencing or static type declarations.

-----

1 point by almkglor 6182 days ago | link

Or just:

  (nfx a + b - c)
An old dorky buggy implementation for CL:

http://www.dwheeler.com/readable/readable/trunk/gloria-infix...

-----

1 point by sacado 6183 days ago | link

Once again, maybe the solution is ssyntax (yep, this is my new motto :) :

  { a + b + c } <==> (+ a (+ b c))
Hmm, not an easy one though.

-----

1 point by absz 6183 days ago | link

The ssyntax system cannot do this: it's limited to working on symbols. You would need access to the readtables in mzscheme to make this work.

-----