[dev] line continuation coding standard?

Michael M Slusarz slusarz at horde.org
Thu Mar 8 18:15:09 UTC 2007


Quoting Jan Schneider <jan at horde.org>:

> Zitat von Chuck Hagenbuch <chuck at horde.org>:
>
>> Quoting Matt Selsky <selsky at columbia.edu>:
>>
>>> When a concatenated string spans multiple lines, where is the '.'
>>> supposed to go?
>>>
>>> $foo = 'bar' .
>>>      'baz';
>>>
>>> or
>>>
>>> $foo = 'bar'
>>>      . 'baz';
>>>
>>> I didn't see this in the CODING_STANDARDS doc...
>>
>> I've been using the latter recently. I don't yet have a strong opinion
>> on it and we don't have a rule for it.
>
> Same here. I used to put it at the end, but changed to put it at the
> front recently, because it lines up more nicely and makes it a visible
> continuation on the first sight.

I guess I'm the only one that likes it the first way then.  I read the  
first way as "Here is some text, and we are going to continue this  
text on the next line (see next line)"  The second way (to me) seems  
like we are missing something at the end of the first line (i.e.  
someone forgot a semicolon).

But I also like to be difficult.  So if the 2nd way is the consensus  
(which it seems to be) I will force myself to make the necessary  
changes.

michael

___________________________________
Michael Slusarz [slusarz at horde.org]



More information about the dev mailing list