Arc Forumnew | comments | leaders | submitlogin
2 points by krapp 1981 days ago | link | parent

We already have syntax in the form of bracketed functions (or whatever they're supposed to be called) and {} for tables.

I'm speaking out of my depth here, but I think it would be nice if scoped syntax extension were a "first class" feature of Arc. It would be nice to be able to load, say, native support for XML syntax as a library or something, or to easily extend the language through grammar definitions.

Also, infix notation in a Lisp? If I had a monocle I would drop it into my coffee with shock forthwith!



3 points by akkartik 1981 days ago | link

Have you seen my proposal for infix syntax for Arc? I think it's pretty nice: http://arclanguage.org/item?id=16775. The big drawback: you have to give up '-' in symbol names.

-----

3 points by krapp 1979 days ago | link

>The big drawback: you have to give up '-' in symbol names.

I wouldn't have a problem with that, but I'm probably of a minority opinion, since that seems to be a Lisp thing. When I started with Arc it took me a while to realize that symbols with asterisks in the name weren't something special like pointers, and using angle brackets just seems wrong after years of writing HTML.

Although if it were possible to do something along these lines, one could have the best of both worlds:

    (defgrammar infix ...)
 
    (w/grammar 'infix (do


    ))

-----