You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by Doug Cutting <cu...@lucene.com> on 2002/09/19 23:47:44 UTC
coding conventions
Scott Ganyo wrote:
> Nevertheless, I'm willing to accept that you have defined it as "Lucene
> standard style" and I do abide by it when developing Lucene...
I don't think style should be (or even can be) mandated. When writing
new code from scratch, a developer should of course try use a style that
is not egregiously different than that of the code that it's destined to
join, but he or she doesn't have to rigidly adhere to an identical
style. When editing existing code, a good-faith effort should be made
to adhere to its existing style. That's just good manners.
In general, we should respect the styles of other developers, and hope
in turn that they will respect our style choices. I don't mind a
project with a variety of styles: the personality of the developer
should show in the code. I don't even mind a class with different
methods coded in different styles if they were written at different
times and/or by different developers.
So I don't think there is a "Lucene standard style". There's my style,
which accounts for a lot of the code because I wrote a lot of the code.
But, for example, the German analyzer, which I did not write, is in a
different style. That's not mayhem, it's just tolerance of diversity.
Doug
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: recommend astyle as indent tool Re: coding conventions
Posted by Otis Gospodnetic <ot...@yahoo.com>.
I agree, but this tool seems to help with indentation only, but there a
number of other rules that one may want standardized.
Anyhow, I think this discussion about people's favourite source code
formatting tools is probably boring to most people here :)
Otis
--- Che Dong <ch...@hotmail.com> wrote:
> Artistic Style
> A Free, Fast and Small Automatic Indentation Filter
> for C , C++ , Java Source Codes
> by Tal Davidson, Israel (E-mail: davidsont@bigfoot.com)
> Main home Page http://astyle.sourceforge.net
> Project Page http://www.sourceforge.net/projects/astyle
>
>
> I think pretty-print source code will make other developers read code
> more efficiently.
>
> Che, Dong
>
> ----- Original Message -----
> From: "Doug Cutting" <cu...@lucene.com>
> To: "Lucene Developers List" <lu...@jakarta.apache.org>
> Sent: Friday, September 20, 2002 5:47 AM
> Subject: coding conventions
>
>
> > Scott Ganyo wrote:
> > > Nevertheless, I'm willing to accept that you have defined it as
> "Lucene
> > > standard style" and I do abide by it when developing Lucene...
> >
> > I don't think style should be (or even can be) mandated. When
> writing
> > new code from scratch, a developer should of course try use a style
> that
> > is not egregiously different than that of the code that it's
> destined to
> > join, but he or she doesn't have to rigidly adhere to an identical
> > style. When editing existing code, a good-faith effort should be
> made
> > to adhere to its existing style. That's just good manners.
> >
> > In general, we should respect the styles of other developers, and
> hope
> > in turn that they will respect our style choices. I don't mind a
> > project with a variety of styles: the personality of the developer
> > should show in the code. I don't even mind a class with different
> > methods coded in different styles if they were written at different
>
> > times and/or by different developers.
> >
> > So I don't think there is a "Lucene standard style". There's my
> style,
> > which accounts for a lot of the code because I wrote a lot of the
> code.
> > But, for example, the German analyzer, which I did not write, is
> in a
> > different style. That's not mayhem, it's just tolerance of
> diversity.
> >
> > Doug
> >
> >
> > --
> > To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> > For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> >
> >
>
__________________________________________________
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
http://sbc.yahoo.com
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
recommend astyle as indent tool Re: coding conventions
Posted by Che Dong <ch...@hotmail.com>.
Artistic Style
A Free, Fast and Small Automatic Indentation Filter
for C , C++ , Java Source Codes
by Tal Davidson, Israel (E-mail: davidsont@bigfoot.com)
Main home Page http://astyle.sourceforge.net
Project Page http://www.sourceforge.net/projects/astyle
I think pretty-print source code will make other developers read code more efficiently.
Che, Dong
----- Original Message -----
From: "Doug Cutting" <cu...@lucene.com>
To: "Lucene Developers List" <lu...@jakarta.apache.org>
Sent: Friday, September 20, 2002 5:47 AM
Subject: coding conventions
> Scott Ganyo wrote:
> > Nevertheless, I'm willing to accept that you have defined it as "Lucene
> > standard style" and I do abide by it when developing Lucene...
>
> I don't think style should be (or even can be) mandated. When writing
> new code from scratch, a developer should of course try use a style that
> is not egregiously different than that of the code that it's destined to
> join, but he or she doesn't have to rigidly adhere to an identical
> style. When editing existing code, a good-faith effort should be made
> to adhere to its existing style. That's just good manners.
>
> In general, we should respect the styles of other developers, and hope
> in turn that they will respect our style choices. I don't mind a
> project with a variety of styles: the personality of the developer
> should show in the code. I don't even mind a class with different
> methods coded in different styles if they were written at different
> times and/or by different developers.
>
> So I don't think there is a "Lucene standard style". There's my style,
> which accounts for a lot of the code because I wrote a lot of the code.
> But, for example, the German analyzer, which I did not write, is in a
> different style. That's not mayhem, it's just tolerance of diversity.
>
> Doug
>
>
> --
> To unsubscribe, e-mail: <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>
Re: coding conventions
Posted by Otis Gospodnetic <ot...@yahoo.com>.
Yeah, forcing is not nice, but even these expectations below is a mild
form of force, and worth documenting, in my opinion. Not everyone will
know what is expected of them.
Furthermore, consistent coding style, even if not one's favourite
style, makes code easier to read and understand, than code with a mix
of styles.
Anyhow, lets move on... :)
Otis
--- Doug Cutting <cu...@lucene.com> wrote:
> Scott Ganyo wrote:
> > Nevertheless, I'm willing to accept that you have defined it as
> "Lucene
> > standard style" and I do abide by it when developing Lucene...
>
> I don't think style should be (or even can be) mandated. When
> writing
> new code from scratch, a developer should of course try use a style
> that
> is not egregiously different than that of the code that it's destined
> to
> join, but he or she doesn't have to rigidly adhere to an identical
> style. When editing existing code, a good-faith effort should be
> made
> to adhere to its existing style. That's just good manners.
>
> In general, we should respect the styles of other developers, and
> hope
> in turn that they will respect our style choices. I don't mind a
> project with a variety of styles: the personality of the developer
> should show in the code. I don't even mind a class with different
> methods coded in different styles if they were written at different
> times and/or by different developers.
>
> So I don't think there is a "Lucene standard style". There's my
> style,
> which accounts for a lot of the code because I wrote a lot of the
> code.
> But, for example, the German analyzer, which I did not write, is in
> a
> different style. That's not mayhem, it's just tolerance of
> diversity.
>
> Doug
>
>
> --
> To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
>
__________________________________________________
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
http://sbc.yahoo.com
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>