← Back to context

Comment by JonChesterfield

4 years ago

Indentation based optimises for reading and sexpr based optimises for writing/editing.

The syntax here looks isomorphic to sexpr. If so, one could program by reading the | based form, then convert the whole file to sexpr to edit it, then pretty print back to indent form when done. Better if the parens only replace the | and whitespace on the conversion so the cursor doesn't jump.

I'm not sure I like that but it is a somewhat interesting design point.

All but the most inexperienced lispers read code by indentation.

Also, pretty much any language that parses to an AST could easily output same as s-expressions if desired. Which incidentally is something I enjoy so much about Lisp. It makes it trivial to reason about code as a tree of structured objects instead of a string.