Arc Forumnew | comments | leaders | submitlogin
2 points by drcode 5979 days ago | link | parent

in brackets.scm all readings of curly braces {...} get converted into the sexp (curly ...)

Next, when the body of a progn is expanded as part of the arc compilation process, the 'curly token is checked for and replaced with a let.

This means you can also write the following:

  (do (curly (+ 1 2))
      (cons ^ ^))
(I know, I'm polluting the namespace with 'curly... that's would be easy to correct, of course)


1 point by almkglor 5979 days ago | link

Ah, so it's a change in ac.scm ? Hmm. Just out of curiousity, do you think you could do this just in the 'do macro? Although you do lose the ability to do that in the function body. Hmm.

-----

1 point by drcode 5979 days ago | link

I could, but I like the way it works now :-)

Also, since this feature hijacks some valuable characters, it would need to be applicable for far more situations than just 'do, or it would be a waste. I believe it fulfills this requirement.

-----