From: Mark O'D. <mar...@lu...> - 2000-09-30 00:32:56
|
Hi All As said I think it's imporant that we break this into two questions. Do we change the code style? and then what do we change it to? So in order to actually decide, we're thinking of running our first Firebird Poll on this YES/NO issue, sometime in the near future. After some discussion here. If we decide to change the code style we can also gain a consensus on the new one to be adopted by Firebird through a second and longer poll. There is also a bit more on some more stuff on this in firebird-admin archive. In anticipation of a Yes vote on the first Poll (which may be a bit premature). Mike has put together something that could be used as starting point for the second Poll. It's not much but could form the basis of the second poll if we go head and change it. everyone should have a say in it. Also, These are religious issues here folks, a lot of people have strong opinions, so step lightly, and be prepared to compromise. Im happy to go along with whatever we all decide: My personal opinion on style (a bit of a repost from admin - sorry about the duplication): It can be changed fairly easily through a beautifier, and if that is the case it would be best to keep the beautifier settings so we can easily push errant/new code back into "standard form". Perhaps the "standard" should be limited to a few beautifier settings. Tracking differences is pretty easy, Im already ignoring white space changes in my comparisons, and so I don't think it'll impeed a merge or tracking differences. Beyond some simple rules, code standards don't want to be too detailed. When writing code most people generally know what to do even if it varies a bit. If it gets too far out of line then it can be chucked through the beautifier again. Coding styles have changed over the years, I even remember doing hungarian notation. Generally what Mike has put forward is what I tend to use now, most of the java stuff follows that tradition now as well. Im willing to be flexible on what style we use, although I do find the lack of indent of the body of a function a bit hard to read. I don't like using tabs, I find myself on strange editors on different systems all the time, and they still today have different tab settings. So I use spaces instead of tabs I hate being on some weird editor (like in MSWord - yes it has happened) and finding the code because of tabs is all over the place. The style if () { blah(); blah(); } I now prefer (saves 10% vertical space :-)), it took a while to get used to it but I consoled myself with the idea that at least the indent of the start of the statement and the end of the statement "}" matched. (I thought it started life as the GNU coding standard somwhere within Cygnus -I think). I use a indent of 4 (wasting that 10% I'd saved previously) because of this and also since edt/eve now has horizontal scrolling I find myself occasionally drifting over the 80 character mark. So my vote will be Yes to change it, and apart from indenting the body and a few things Im not too particular as long as we all decide. Also we don't need to rush into it, IF we decide to change then continuing to work with the current style for a month or two, will loose nothing, and the new style can be refined in that time. Was it Steve Jobs, that when asked what he thought about Microsoft his opinion was that they didn't have any style ;-). Cheers Mark -- Your database needs YOU! http://sourceforge.net/projects/firebird |