Coding style
Olivier Fourdan
fourdan at xfce.org
Fri Mar 14 22:28:48 CET 2003
Gentlemen,
I did not force anybody to use my coding style, but if you guys want to
have to standardize on a coding style please use the one I proposed,
because I won't change my style anyway...
- I do prefer to have an instruction per line, even if it's 120 car
wide. I don't use neither vi nor emacs and my text editor has a horiz
scrollbar.
- I use curly braces even if there is only one instruction after an
if/while/for because I find it easier to read
- I expand the source because I don't want tabs. Some editors use 4 or 8
car for a tab and that really break readability
- I use 4 cars per indentation.
- I really don't care about what the people who write the kernel do :)
Now that's a take it or leave it offer. I you don't like that, use
whatever you want, but don't ask for a standard coding style then.
Cheers
Olivier.
On Fri, 2003-03-14 at 21:59, Benedikt Meurer wrote:
> On Fri, 14, Mar 2003, edscott wilson garcia wrote:
>
> > El vie, 14-03-2003 a las 13:28, Jens Luedicke escribió:
> > > On Fri, 2003-03-14 at 14:24, Benedikt Meurer wrote:
> > >
> > > > Anything important to note in addition? Opinion? Olivier, is that OK?
> > >
> > > indenting: tabs instead of spaces.
> > >
> > > and I prefer:
> > >
> > > if () {
> > > } else {
> > > }
> >
> > I do this a lot for short if/else blocks, along with KNF for large
> > blocks. But this is a rather minor detail for me. What is more
> > important, IMHO, is that indentation be context sensitive, like the
> > following line:
> >
> > gtk_tree_store_set((GtkTreeStore *) treemodel, target,
> > MODE_COLUMN,mode_string(en->st->st_mode),
> > DATE_COLUMN,time_string(en->st->st_mtime),
> > GROUP_COLUMN, group,
> > OWNER_COLUMN, owner,
> > SIZE_COLUMN, tag,
> > -1);
> >
> > Instead of having it all run through in a single loong line.
>
> ACK. I'd really like to see people stop writing lines with 120 and more
> characters.
>
> regards,
> Benedikt
--
Olivier Fourdan <fourdan at xfce.org>
http://www.xfce.org
More information about the Xfce4-dev
mailing list