Arc Forumnew | comments | leaders | submitlogin
1 point by akkartik 4671 days ago | link | parent

Very cool indeed.

"A form containing a single object evaluates to the object, which means that (1) ==> 1. Even without this added alteration to standard lisp evaluation of forms, we simply write val 1 instead of 1 above, val being the identity function"

Here's how I describe the rule at http://github.com/akkartik/wart#readme:

"Lines with a single token are never wrapped in parens."

:)

Hmm, though it's not quite accurate. Parens, quotes and unquotes don't count as tokens for the purposes of this rule, so as to do right by lines like this:

  34)))
I should just stop using the jargon-y 'tokens' and say 'words' to clarify this.


1 point by seertaak 4670 days ago | link

Funny; we really are thinking about the same problems. bullet will currently puke if it encounters a lonely ')'. It's definitely sub-optimal. I think your solution of looking for words is the right way to go -- I didn't get around to implementing it though, because at some point I waded neck-deep into semantic analysis, code generation, ASM, invoke dynamic. Compilers really are fascinating creatures :)

-----