[Lazarus] clarification / Re: constant-highlight ? [Re: quick opinion poll / pascal highlighting "case"]

Martin lazarus at mfriebe.de
Wed May 26 12:37:41 CEST 2010


On 26/05/2010 08:56, Duncan Parsons wrote:
>
> Anyway, having seen the screenshot that Vladimir put up, I quite like it (not using a terribly uptodate version at the mo, whilst some pascal dev is on hiatus). I would opt for it being on (I know it's a quiet voice in a sea of no!), and bold wouldn't be a bad idea, or just another distinctive colour.
>    

I changed it to off by default when I introduced the user-definable 
colorschemes.

But i am kind of glad that at least a few people share my opinion.

I guess a previous poster was right. Many people only read code they are 
familiar with, or that has easy to read case statements anyway. (after 
jedi-format).
On the other some of the case statements I had to look at (and no, I did 
not write them myself) are less easy to detect, even though they use 
proper indent.
But if:
- a single block in the case, spans over 50 or more lines (multiply 
screen pages)
- is already indented 4 or 5 levels at the start (so you can no longer 
tell how many levels that are by just looking at it, could be 8 space, 
could be 10)
- has several nested if, or other blocks within it.

[ don't start arguing, that then the code should be rewritten, => to 
rewrite the code one must read it first]

then indent alone is almost useless to make out where a case-block 
starts. All you have is a ":" at the end of the label. not that easy to 
spot. (and if it's an else, all you have is a simcolon on the end of the 
previous line, that's a guaranteed one to overlook)


Martin





More information about the Lazarus mailing list