Totally agree, all my { end up on the next line, 1st spot when starting a function, last character of the keyword when starting an if/for/… section. I even put the closing one on the same line when it’s single line, else either at the end of the closing line (when changing really old code) or same indent.
So indenting varies a lot, which makes most ‘new’ programmers go mental.
while (my code)
{ I'lldo it my way }
if (! liked)
{ toughen-up }
else
{ get used to it
multi-line can go both ways...
}
To be honest, I think the forced ‘fixed’ indent in python is horrible, not being able to identify the different block function just by the indent, not being able to use % in vi to find the correct end,…
Much be an age thing, I learned to program in the 80s.
Is this some kind of python meme I’m too C++ to understand?
Now, I’m completely willing to start a war about { going on the next line.
Totally agree, all my { end up on the next line, 1st spot when starting a function, last character of the keyword when starting an if/for/… section. I even put the closing one on the same line when it’s single line, else either at the end of the closing line (when changing really old code) or same indent.
So indenting varies a lot, which makes most ‘new’ programmers go mental.
while (my code) { I'll do it my way } if (! liked) { toughen-up } else { get used to it multi-line can go both ways... }
That is, unless the font used messes it up. ;)
That’s horrible.
To be honest, I think the forced ‘fixed’ indent in python is horrible, not being able to identify the different block function just by the indent, not being able to use % in vi to find the correct end,…
Much be an age thing, I learned to program in the 80s.