Arc Forumnew | comments | leaders | submitlogin
1 point by eds 6159 days ago | link | parent

I just thought of another solution which might fix this problem without needing any special syntax characters.

If you consider that the reason we know to add parentheses around structures in the first place is the indentation of forms below the current line, then it is ambiguous whether a form with no nested forms should be wrapped in parentheses or not. If the system then does not assume the innermost forms are function calls, then it solves the problem of interpreting literals as function calls. Thus you can now do this:

  if
    test
    exp
      exp2
        (very-long-exp3 5 6 7 8)
      (some-random-exp4)
    test2
    exp5
      (exp6)
      (exp7)
Which cleans up many parentheses (removing all parentheses was never our goal in the first place), and doesn't result in the extra parentheses that were a problem before.

I found that it was trivial to implement this in my previous code. You can find the updated version at: http://blackthorncentral.net/files/read-indentation.scm



1 point by almkglor 6159 days ago | link

Note that the above syntax is already what is pretty much the basis for all i-exprs in the mailinglist I posted, which is the main reason I posted the mailinglist.

-----