Matthew Weier O'Phinney wrote:
-- Pádraic Brady <[EMAIL PROTECTED]> wrote
(on Tuesday, 29 July 2008, 03:32 AM -0700):
I don't know about everyone else, but I once a param is going to cross the 80
space limit I'll put it on a new line indented from the start of the
function declaration and continue as normal:

    public function longMethodDeclaration(Zend_Controller_Front $front,
        Zend_Cache $cache = null, Zend_Db_Table $databaseTable,
        Zend_Feed $feed)
    {

I'm going to make another note here. PEAR2 CS is proposing using the
following syntax when wrapping:

    public function longMethodDeclaration(Zend_Controller_Front $front,
        Zend_Cache $cache = null, Zend_Db_Table $databaseTable,
        Zend_Feed $feed
    ) {

Would that not make some editors folding options seem a bit odd?

Probably not, but I personally always like to keep the open and close braces inline for visual confirmation of matching code blocks. This all falls down if you prefer your braces at the end of the control line of course!

I know what you mean regarding reducing changeset size but it doesn't work for function defintions as the , is needed anyway to extend it and it stays with the argument before. Works for adding another condition in a control statement assuming you like the && or || etc. at the start of the line (which I personally do as it's easy to see them).

But overall this seems like bending over to suit this situation where the real imporant thing should be on readable code over readable changesets (not saying the latter isn't important, just that readability of code is IMO more important).

My €0.00  (e.g. I don't have any say here!!!)

Col


Reply via email to