[dev] line wrapping
Michael M Slusarz
slusarz at horde.org
Mon Jun 16 18:15:24 UTC 2008
Quoting Michael Rubinsky <mrubinsk at horde.org>:
> Quoting "Jan Schneider" <jan at horde.org>:
>
>> Zitat von Chuck Hagenbuch <chuck at horde.org>:
>>
>>> I'd like to propose letting line-wrapping changes like this:
>>>
>>> - return Horde::callHook('_whups_hook_get_attributes',
>>> $type, 'whups');
>>> + return Horde::callHook('_whups_hook_get_attributes', $type,
>>> + 'whups');
>>>
>>> go. I don't know how many horde developers or people who read
>>> horde code have fixed 80-column screens now, but to move, moving
>>> 9 characters to a new line does not increase overall code
>>> readability. Thoughts?
>>
>> I do, though admitted only to comply with the CS. I still think it
>> *does* increase readability, especially when the code otherwise
>> wraps on the screen like in the quoted code above.
>> But I'm fine with a more relaxed CS, like an optimal line length of
>> 80 chars and a maximum line length of 90, or 100.
>>
>
> I agree with Jan. I find code like that easier to read, maybe
> because I've grown used to it. I'm all for a more relaxed line
> length/wrapping standard though.
Just to be me :), I disagree. For something like this, I would prefer
just to let it wrap. Splitting out into separate lines only makes
sense if there is a bunch of embeded parentheses/commas/etc.
But I also think that
$example = foo .
longline .
bar;
Makes a whole heck of a lot of sense more than
$example = foo
. longline
. bar;
That second example is really hard to read IMHO.
michael
--
___________________________________
Michael Slusarz [slusarz at horde.org]
More information about the dev
mailing list