SELECT
some_col
, another_col
--, and_another
, and_more
FROM blah
EDIT: too bad formatting is screwed up :/In fact, in a language like Javascript where extra trailing commas are allowed, it seems that this argument makes even more sense for commas at the end than it does for commas at the beginning. Then, there would never be a situation where you would have to edit a line besides the one you were commenting out.
...
== NO_REGS))
#ifdef CANNOT_CHANGE_MODE_CLASS
|| (REG_P (SUBREG_REG (in))
&& REGNO (SUBREG_REG (in)) < FIRST_PSEUDO_REGISTER
&& REG_CANNOT_CHANGE_MODE_P
(REGNO (SUBREG_REG (in)), GET_MODE (SUBREG_REG (in)), inmode))
#endif
))That || needs to be inside the #ifdef, so it can't follow on the same line as the "== NO_REGS))".
And once you're doing that, might as well use them for the whole file.
Usually I only put them at the end of a line in languages that do implicit line endings, and will false-positive when you move the operator to the next line (i.e. javascript and visual basic).
http://blog.izs.me/post/2353458699/an-open-letter-to-javascr...
I would say that the most common problem is having a semicolon not being inserted if you start a line with `(` or `[`. In practice, the only time when a semicolon gets inserted where it shouldn't is when returning an object literal.
When you split an expression into multiple lines, split it before an operator, not after one. Here is the right way:
if (foo_this_is_long && bar > win (x, y, z)
&& remaining_condition)
1) https://www.gnu.org/prep/standards/html_node/Formatting.htmlconstant...
or get code...
or strict low
instead of
constant... or
get code... or
strict low
<pre><code>
$moo =
[
a
, b
, d
];// insert c
</pre></code>
better than having the delimiter at the end, where you a) have to take care where you relocate the last element and b) could forget to remove it at the last element (most language parsers tolerate that though).
I.e., this style (used in this case)
versus this style: I don't have a personal preference here, just looking for any practical pros and cons I may not be aware of.More on topic, I don't see why keep such a big conditional and not move it out to its own function(s) (but this has been asked already in this thread).