Arc Forumnew | comments | leaders | submitlogin
6 points by cchooper 6147 days ago | link | parent

I'd seen your post so I was hesitant to post mine, but I think it's worth it because we're using two different approaches.

I'm trying to let the user specify what is/isn't infix, which is why I detect operators rather than numbers. I want the macro to have uses beyond infix arithmetic e.g. parsers expressed in BNF.

Also, mine is written entirely in Arc, so it's a good demonstration of what Arc can do, not to mention good practice for me.

So I think both our solutions have their place :)



5 points by eds 6147 days ago | link

I fully support what you are doing, people might not want implicit infix math all the time. It also looks like you are thinking more toward how to let the user define infix operators, which my version doesn't do a good job with.

I actually rewrote my version in arc, except for 2 lines in ac.scm (one which implemented something pg was already thinking about, and one which allowed (eval (list + 3 4))). I posted a comment about it on my original post, but I think it got buried so far down that no one ever saw it.

-----