On Sun, Jun 06, 2004 at 01:39:35AM +1000, Tim Starling wrote:
Ashar Voultoiz" wrote:
Hello,
I am willing to know which formatting method we should use in code for
function declarations. Actually I see two shemes:
1)
function foobarone() {
code here
}
2)
function foobartwo()
{
code here
}
My personal style is the second, but I think a number of other MediaWiki
coders lean towards the first. The second is the K&R standard, see
http://pantransit.reptiles.org/prog/CodingStyle.html . In more recent code
I've been mainly using the first one, since I realised it was predominant
before I came along. So I'd be happy enough converting everything to the
first.
I'm normally also using style 2 myself.
Some statistics ( /includes/* only)
jf@mormo:/var/www-phase3/includes$ grep function *php| grep '(' |wc -l
1425
jf@mormo:/var/www-phase3/includes$ grep function *php| grep '(' |grep '{'
|wc -l
692
Looks like a tie.
Regards,
JeLuF