From: Ben H. <be...@im...> - 2010-06-24 07:17:05
|
I agree (with Petr and John). I think it would be a negative change to reformat agg. Ben -----Original Message----- From: Petr Kobalíček [mailto:kob...@gm...] Sent: 24 June 2010 05:56 AM To: Anti-Grain Geometry Subject: Re: [AGG] source code style I agree with John. Also, I don't understand why to change coding style in agg. The antigrain library is not badly written and I have no problem to navigate in the code. So I think that changing coding style is contraproductive - it will waste time, because auto-formatters can destroy some manually formatted stuff inside. Also tab vs. spaces discussion is interesting, but I really hope that nobody will start reformatting antigrain sources, because current status is simply OK. Code without TABs is neutral, anybody can view it as is without trying different TAB settings. I read thousands of source files and I must say that TAB neutral way (without tabs) is the best, and if we start talking about cross-platform (and cross-ide edited) projects then I hope that nobody say here "lets use tabs". I don't know if antigrain coding style is documented somewhere, but if somebody want to write contribution why not just use agg coding style? -- Best regards - Petr Kobalicek <http://kobalicek.com> On Thu, Jun 24, 2010 at 4:32 AM, John Horigan <jo...@gl...> wrote: > The boost style looks ok, but I can think of some areas where the existing agg style is better, or at least not worse: > 1) boost style requires class member variables to end in '_', agg begins them with 'm_' > 2) boost style has opening brackets at the end of the line, never on a new line. Agg uses a new line for opening brackets for class/struct bodies, names spaces, and function bodies (except for one-liner functions in header files). > > boost style does not address this issue, but I really like the following style: if an if, while, for, or switch header cannot fit in one line and must be wrapped then: 1) curly brackets are required for the statement body, 2) the opening bracket must start on a new line. > > -- john > > On Jun 23, 2010, at 3:22 PM, Jim Barry wrote: > >> On 2010-06-23 22:39, Stephan Assmus wrote: >>> I have no idea yet what the boost style is, I just hope it doesn't try to encode the type into variable names, which I find greatly reduces readability. >> >> Gosh no - "Hungarian notation" is a total and utter abomination! Death >> to Hungarian notation! :-) >> >> The Boost style guide is here: >> >> http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml >> >>> The very simple and strong argument pro a hard 80 char/line limit is that horizontal scrolling sucks. Thus there ought to be "some" limit >> >> Yes, of course, but 80 characters is a little bit low for modern times, >> I think. I used to restrict myself to 80 characters but increasingly I >> found it just wasn't enough so now I don't have a hard limit but I >> generally code to 100 characters or maybe slightly more. Most of the >> time I don't get anywhere near that though, as I try to avoid >> excessively deep nesting and suchlike. >> >>> In any case, discussions about the perfect style have a great potential to go out of hand >> >> How true. >> >>> In general, though I am perfectly happy with the AGG coding style. Changing an entire code base with a decent style to another style could also be considered a waste of time. >> >> Yes, other than the fixed-pitch whitespace alignment, I don't have a >> problem with it. >> >> Cheers, >> >> - Jim >> >> >> ------------------------------------------------------------------------------ >> ThinkGeek and WIRED's GeekDad team up for the Ultimate >> GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the >> lucky parental unit. See the prize list and enter to win: >> http://p.sf.net/sfu/thinkgeek-promo >> _______________________________________________ >> Vector-agg-general mailing list >> Vec...@li... >> https://lists.sourceforge.net/lists/listinfo/vector-agg-general > > > ------------------------------------------------------------------------------ > ThinkGeek and WIRED's GeekDad team up for the Ultimate > GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the > lucky parental unit. See the prize list and enter to win: > http://p.sf.net/sfu/thinkgeek-promo > _______________________________________________ > Vector-agg-general mailing list > Vec...@li... > https://lists.sourceforge.net/lists/listinfo/vector-agg-general > ------------------------------------------------------------------------------ ThinkGeek and WIRED's GeekDad team up for the Ultimate GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the lucky parental unit. See the prize list and enter to win: http://p.sf.net/sfu/thinkgeek-promo _______________________________________________ Vector-agg-general mailing list Vec...@li... https://lists.sourceforge.net/lists/listinfo/vector-agg-general |