Hello. A question of style...
What is your preferred method of line-breaking conditional expressions (assuming they're long enough to warrant line breaking, unlike my examples below)? (I'm ignoring the "where does the curly brace go" issue here :)
Some examples:
I use the first two examples above under different conditions, but I haven't identified what makes me choose one or the other, yet.# The operator goes at the end if (A && B && C) # The operator goes at the beginning if (A && B && C) # My editor won't do this one for me automatically if ( A && B && C)
Thanks,
Alan
Update: Lately I've been using operator-first notation. I almost always indent all of my perl the way Emacs perl-mode wants it indented, so most of the time I don't spend much time thinking about it.
Back to
Meditations