Couple points. First, for decades (at least the 70s & 80s) before Python, Lisp 
people would say, in defense of its many parentheses, "one always reads by 
indentation anyway with some Emacs auto-shaper". This was so commonly uttered 
one might call it a "refrain". So, Python (copying ABC, actually) just 
formalized long-standing tradition by cutting out the middle man with the 
offside rule.

There are lisp readers that also try to systematize this. Some might even 
pre-date Python, but I am no Lisp historian. In any event, I continue to be 
surprised how uncommon this is in PLs. 
[Wikipedia](https://en.wikipedia.org/wiki/Off-side_rule) only lists about 20-30 
PLs with it, and I'm sure there must be a sample space at least in the many 
100s.

Second, vim % does work fine on (), {}, [] for Nim code. It would likely be 
straightforward to make it work on top of ':' for the forward jump. Maybe 
alaviss/leorize/gradha can add that to the neovim Nim plugin? I suspect it 
would be popular. Maybe he already did and it's just not called '%' by default?

The backward '%' jump from the closing end might be trickier to even define. 
This is because many blocks can end on the same exact character (where Lisp 
would have a giant pile of parens to count). Most recent non-quoted ':' might 
not be a bad "guess", though.

* * *

Productivity of virtually any human-computer UI is a much harder question to 
pose/answer and usually just asserted/guessed. E.g., the people who freak out 
about the offside rule mostly cite various code manipulation habits. Almost all 
claims are quantitatively framed but very weakly studied, if at all.

A couple other questions in this space (also hard & weakly studied, but raised 
more rarely) are Why don't you see more C-like syntax formatted like Lisp, 
e.g.: 
    
    
    int main(void) {
      if (1) {
        while (1) {
          /**/ } }
      else {
        /**/ } }
    
    
    Run

OR Why don't you hear as many "8 close braces in a row! Spanning 8 lines! 1/3 
of the code!" complaints about C code the way you hear it about Lisp code 
parens.

Reply via email to