cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Piroumian, Konstantin" <KPiroum...@flagship.ru>
Subject Coding format
Date Thu, 24 Jan 2002 13:41:44 GMT
Hi, again!

> >Btw, what is the coding standart for Cocoon sources? I use Sun's
> >format, but somebody has reformatted several sources to something
different
> >and unusual.
> >
> The Sun format should be used. What sources are you talking about ?

I18nTransformer and SQLTransformer, at least. Mainly, the difference is in
whitespace usage and switch-case constructs, but it's annoying. Sun coding
style guide tells not to use blanks between parenthesis:

    myFunction( arg1, arg2 );     // WRONG!
    myFunction(arg1, arg2);       // RIGHT!

and the switch-case format is (it's a little strange, IMO):

switch (condition) {
case 1:                        // Note, that there is no indent for case
keywords
case 2:
    statements;
    break;
case 3:
    statements;
    break;
default:
    statements;
    break;
}

Also, there is a lot of lines that are longer than 80 columns.

Btw, Avalon uses different coding standart, with opening brace on a new
line:
function()
{
    // statements
}

Best regards,
    Konstantin Piroumian


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message