From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,8b756d9a0afb052a X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!news3.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsfeed.arcor.de!news.arcor.de!not-for-mail Date: Sat, 18 Feb 2006 16:36:35 +0100 From: Georg Bauhaus User-Agent: Thunderbird 1.5 (Windows/20051201) MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Quick question about Ada code formatting. References: In-Reply-To: X-Enigmail-Version: 0.94.0.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Message-ID: <43f74bc0$0$13593$9b4e6d93@newsread2.arcor-online.net> Organization: Arcor NNTP-Posting-Date: 18 Feb 2006 17:30:56 MET NNTP-Posting-Host: 35d6e8fc.newsread2.arcor-online.net X-Trace: DXC=G Simon Wright wrote: > What always baffles me is how people will *not* train themselves to do > what the style checker expects, and will *not* just fix the style > warnings as they go. A "hand writing" can work for one person, but not for an other person. People can, and do fight over whose handwriting viz. Ada style is better. Even neglecting the strong influence that a font can have on appearance. But I think there are much more important issues, and just -gnaty is overly strict here. Good in my (limited) experience: - Consistent use of whatever non-typographical convention is in use. - Comb structure, and then tough may use 4 or 2 spaces or whatever. (so does the GNAT default style in constructs that are continued on the next line, so...) There is no real harm done when one block uses just 2 spaces for the indented lines, and another uses 5. I understand that some people go crazy when they find knife, spoon, and fork not properly aligned,no matter how good or bad the meal is. But programming has more to do with recipes and food than with the relative angle of eating tools during the "work". Also, play with the image of fish & chips in a paper box, framed by sterling cutlery - Compare how easily something is looked up in the code versus how easily something is read (left-right, top-down) in the code. These two processes are very different. Their analog in regular texts is table versus paragraph. There will have to be a compromise, then, unless you think that code that looks ordered is code that actually is ordered. Slightly different handwritings will work. And it makes team mates feel better, because they can adopt some of their very own hand writing style nevertheless, without doing harm to others provided everyone has retained some modicum of flexibility. An additional proof of -gnaty being overly strict is when it comes function names in GUI programming. Many do not want to see '_'s in identifiers when they are use to them without the underscores. Note the "used to"... :-) There is a study (from Kent?, comparing MISRA C and other style guides) that demonstrates how useless and wasteful typographic sophistry is. -- Georg