LVTI Style Guide

Brian Goetz brian.goetz at oracle.com
Fri Mar 23 17:28:18 UTC 2018


> there is also a notion of block of code,
> alternating var definition and non-var definition make the code not really readable.

Stuart takes pains to point out how much context matters; this is 
another bit of context that could nudge the right balance a bit one way 
or the other in certain cases.  If there's a big block of variables that 
are all-but-one var, then it exerts a pull towards all-var.  This is 
often OK, but needs to be subject to the other guidelines.  However, I 
think the IDE is best to not try and take this into account; as Tagir 
mentions, there is always the option of asking for the quick-fix.  I 
think the real IDE discussion is, under what circumstances should the 
IDE highlight something as "your code is dirty".  And I think erring on 
the side of minimal here is desirable.




More information about the amber-dev mailing list