Style

6 views
Skip to first unread message

Abe

unread,
Jan 19, 2012, 10:20:09 AM1/19/12
to leedsjs
What are peoples thoughts on formatting/indentation? Tabs versus
spaces? Two spaces or four?

I like the look of the nodejs style guide although I probably would
have gone with four spaces.

http://nodeguide.com/style.html

It might be easier to go with theirs or something similar instead of
writing our own.

What are peoples thoughts?

Abe





Abe

unread,
Jan 19, 2012, 11:01:18 AM1/19/12
to leedsjs
I should also add that my question is in regards to the jackdaw group
project (although its interesting to hear opinions and arguments in
general).

https://github.com/LeedsJs/jackdaw

I think Jamie Zawinski has some interesting arguments in favour of
spaces.
http://www.jwz.org/doc/tabs-vs-spaces.html

Although I agree with Jeff Atwood that the most important thing is
consistency.
http://www.codinghorror.com/blog/2009/04/death-to-the-space-infidels.html

Abe

Sam Foster

unread,
Jan 20, 2012, 5:36:10 AM1/20/12
to leedsjs
+1 on the node styleguide: 2 space tabs, all the other stuff there
looks good to me.
I'd only relax the rules on declaring variables using commas - which
can be handy sometimes. But I'll not be code-nazi-ing if anyone want
to follow these rules to the letter.

I'm prepared to make an executive decision on this. If you strongly
disagree and can explain why, say now.

Sam

On Jan 19, 3:20 pm, Abe <a...@abesmith.co.uk> wrote:

Jimmy Forrester-Fellowes

unread,
Jan 20, 2012, 7:06:19 AM1/20/12
to lee...@googlegroups.com
I agree, with stuff like this you need to just make a decision for the project's consistencies sake. 

I have no real reason to oppose 2 space indentation apart from the fact it makes eyes bleed and leaves a sicky taste in my mouth.

but I'll go with the flow ;-)
Reply all
Reply to author
Forward
0 new messages