← Back to context

Comment by isr

13 hours ago

picolisp has an interesting solution to this. A single ']' will close all open )'s for that block of code

picolisp also has an interesting closing paren style by its author, with a space before closing parentheses if the open parenthesis is not on the same line:

  (- 1
    (+ 2
      (* 3 (/ 4 5)) ) )

That has to be a nightmare for parsers lol

  • not really. it's just pop all of the stack and return to depth 0. you can still detect imbalanced parens, but i'm not sure how it affects the provenance question of where a missing one would point out in errors.