Sunday, January 25, 2015

[luertkdq] Labeling parentheses

Modify a computer language which uses parenthesis (or brackets or braces) (so pretty much all languages) so that every open parenthesis may optionally be annotated with a name, which must match the annotation of the matching close parenthesis.  The goal is not to get lost in a sea of parentheses (especially close parentheses), to be able to see the extent (especially endpoint) of a block without having to, say, position a cursor on the close parenthesis to trigger s-expression highlighting.

Inspired by "endfunction : foo" in SystemVerilog. If this idea is applied to a language without parentheses, it will probably look like SystemVerilog.

Interesting would be to do it for Lisp.  It would hopefully complement but might interfere with automatic parenthesis numbering.

No comments :