Re:Writing more legible SQL
by vog on Thursday November 03, 2016 @11:31AM
(#12864794)
But the disadvantage is that you don't immediately see whether it is "and", "or" or something else.
That's why in most programming languages the coding style says you should put the operators at start of line instead of end of line, e.g.
GOOD:
if ((...some_condition_that_may_make_sense...)
&& (...some_other_condition...)
&& (...and_yet_some_condition_that_makes_sense...))
x = ((some expresssion)
+ (some other expression of different length)
- (some final expression))
BAD:
if ((...some_condition_that_may_make_sense...) &&
(...some_other_condition...) &&
(...and_yet_some_condition_that_makes_sense...))
x = ((some expresssion) +
(some other expression of different length) -
(some final expression))
That's why in most programming languages the coding style says you should put the operators at start of line instead of end of line, e.g.
GOOD:
BAD: Examples:- Python PEP-0008: "Should a line break before or after a binary operator?" https://www.python.org/dev/peps/pep-0008/#should-a-line-brea...
- Topvoted SO answer for "If you break long code lines, how do you indent the stuff on the next line?" http://stackoverflow.com/a/699347