Am Sonntag, 3. August 2008 00:27:32 schrieb Dennis Schridde: > - I am unsure whether the "style rules" are too strict. For example I do > not think it makes much difference whether I put braces on the same line as > the if or not. Something like this also sounds ok to me: > """ > Keep the style of the surrounding code (and do not change existing > formating), unless you rewrite it anway. Whatever you write, make it > readable. (If in doubt better add more spaces or newlines.) > """ > And if someone is never in doubt, he can still be asked to change his > style. I do not know how this is handled elsewhere, though, and we had this > quite some times already, so I understand if you do not want to pick it up > again. Just felt that I was not alone with the feeling that the current > rules are a bit strict. Or maybe it wont work like that... (After some talk with examples I am convinced...)
http://techbase.kde.org/Policies/Kdelibs_Coding_Style What I like there is the "recommended" in it. I assume that means: If a line or two do not conform, well, shit happens. In case you do not read the following, the first paragraphs may still be commented on independently. ;) Something on my personal "coding style" <warning, flamewar ahead>: I do not do any alignment, just logical indention. Example: if (a == b && c == d) vs. if (a==b && c == d) Result: Looks not as pretty (but then coding is no art of beauty to me), but the logic is transfered ("this belongs to if()"), it is extremely easy to type (just one keypress, no "how many keypresses are required to align it"), you cannot accidentially mix spaces and tabs (since there is only one, not two types per line) and some editors automatically replace x-spaces with a tab when pasting (particularly useful when taking code from other locations, and honestly I do not even know how to stop Kate from doing it, and no, no vim for me...). Just in case you see it, now you know who is to blame for it. ;) (And maybe it sounds logical enough to make everyone a believer, who knows. But then it still depends whether you prefer something for the eye or not...) Reason I talked about it: The 3 negative points I mentioned. I'd rather prefer spaces only than mixed, it is just easier. (I even know how to setup Kate for that. ;) ) --Devurandom
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ Warzone-dev mailing list Warzone-dev@gna.org https://mail.gna.org/listinfo/warzone-dev