osdir.com


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Scala considering significant indentation like Python


On 05/22/2017 07:59 AM, Jussi Piitulainen wrote:
> I am the inventor of multiple ends on the same line. This way, in a
> language where all of several nested constructs end with an end - not
> going to name the language but it's Julia - instead of
> 
>                 end
>             end
>         end
>     end
> end,
> 
> one combines the uninformative lines into one by writing
> 
> end end end end end,
> 
> and with four-space indentation the ends align neatly with the starts.
> Technically, the ends on the remaining line of ends are backwards.

Kind of reminds me of LISP.  Lots of closing parenths, and often then
just all get stuck together on a long.  But I guess that's why they
invented paren matching shortcuts in editors.  To make it easy to see if
you have them matched up.  This works with braces too.  Perhaps there is
a plugin for Vim to jump back and forth between the beginning and end of
a blog?  Wouldn't be too hard to just look at indent.