On 2012-10-26 18:37, Joseph Heled wrote:
Hi,
I am in favour of
-- uniform style in a project
If I was the lone person on my own project I would have globally
reformatted everything and put it away already. I agree, having
everything in one format would be nice. And then suggest it as the
coding style for our project for the code contributors.
-- not mixing tabs and spaces. I would say use spaces only.
Yes, this is often a debate in itself. I have no problem with all
spaces. Many of the modern editors support the conversion of a hard tab
into spaces. The advantage is that you can read it even in editors that
can't have the tab width adjusted and it still looks correct. I don't
think extra file size is as much of a concern. I don't know how many are
saving it onto punchcards ;-), nor is it destined for webpages.
-- reasonably cramming as much code into HxW as possible : my
eyesight forces me to relatively large font, even on a large screen.
So I *hate* lines with a single curly (wasting the most precious
resource, vertical lines). I also prefer 2 spaces indentation - could
probably live with 4.
So curly braces on control statements would help. And you'd probably
prefer to have blank lines minimized (These options exist in the
automatic code formatters as well)
Regarding tabs I'm not a personal fan of two, and I think 8 is too many
for our project given the indentation depth of some of our functionss. I
will point out that the Google c-style is a tab width of 2, so it does
have a following. I have to throw my hat into the ring and say I have a
personal preference of 4. I do use 8 on my own projects, but I wouldn't
suggest it here.