Arc Forumnew | comments | leaders | submitlogin
3 points by kennytilton 6152 days ago | link | parent

Sorry for my repetitiveness (said the same elsewhere) but The Lisp Way when you need a domain-specific syntax is to implement that with a macro and then use the syntax wrapped by the macro. Then Peter does not need to rob Paul (in this case by impoverishing the Arc naming syntax to get math syntax).

Has anyone looked at the CL infix packages?



2 points by eds 6152 days ago | link

If you will simply go without not having whitespace between operators, then you doesn't need to disallow cool characters in symbols or add macro calls in front of all the infix expressions in your code. Honestly, all you save in whitespace you probably spend immediately in having to make the call explicit. I like that the current system integrates infix math seamlessly with s-expressions, that's why I spent my time writing that code. (Admittedly, the infix parts aren't perfect, but the integration itself is fairly seamless.)

I did look at some of the CL infix packages. And if I didn't have programming assignments to work on I might consider porting one.

-----