Style

已查看 6 次
跳至第一个未读帖子

Abe

未读,
2012年1月19日 10:20:092012/1/19
收件人 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

未读,
2012年1月19日 11:01:182012/1/19
收件人 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

未读,
2012年1月20日 05:36:102012/1/20
收件人 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

未读,
2012年1月20日 07:06:192012/1/20
收件人 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 ;-)
回复全部
回复作者
转发
0 个新帖子