80 or 79 characters limit?

Joel Sherrill joel at rtems.org
Thu Nov 5 19:15:11 UTC 2020


On Thu, Nov 5, 2020, 1:12 PM Christian Mauderer <oss at c-mauderer.de> wrote:

> Hello Joel and Sebastian,
>
> On 05/11/2020 16:44, Joel Sherrill wrote:
> >
> >
> > On Thu, Nov 5, 2020, 9:26 AM Sebastian Huber
> > <sebastian.huber at embedded-brains.de
> > <mailto:sebastian.huber at embedded-brains.de>> wrote:
> >
> >     Hello,
> >
> >     I review currently the Coding Conventions. Should the 80 characters
> >     limit be really a 79 characters limit with the \n as the invisible
> 80th
> >     character?
> >
> >
> > Yes.
> >
> > As old as this makes me feel, I remember printers which did an automatic
> > linefeed and then the newline one if you hit column 80. So it really is
> > 79 unfortunately.
>
> I don't think printers with an automatic linefeed are a common use case
> for reading the RTEMS source code nowadays. So that maybe isn't the best
> reason for using 79 characters.
>

+1

>
> I would suggest to use the same convention that most coding styles use
> which seems to be 80 characters:
>
>   https://en.wikipedia.org/wiki/Characters_per_line#In_programming
>
> At least if there are no more recent examples for tools or editors where
> 79 is a benefit. 80 seems just feels a bit more natural.


> By the way: If we count '\n': Should we count a tab '\t' as a single
> character, as 2, as 4 or as 8 ones?


We shouldn't have tabs in code we own.

What about the few Unicode
> characters that slipped in over the years?
>

We also shouldn't have unicode characters randomly floating around. They
tend to pop up in my experience when people copy from word processors and
get fancy quotes. Those cases should be eliminated


> Best regards
>
> Christian
>
> >
> >
> >     --
> >     embedded brains GmbH
> >     Sebastian HUBER
> >     Dornierstr. 4
> >     82178 Puchheim
> >     Germany
> >     email: sebastian.huber at embedded-brains.de
> >     <mailto:sebastian.huber at embedded-brains.de>
> >     Phone: +49-89-18 94 741 - 16
> >     Fax:   +49-89-18 94 741 - 08
> >     PGP: Public key available on request.
> >
> >     embedded brains GmbH
> >     Registergericht: Amtsgericht München
> >     Registernummer: HRB 157899
> >     Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas
> Dörfler
> >     Unsere Datenschutzerklärung finden Sie hier:
> >     https://embedded-brains.de/datenschutzerklaerung/
> >
> >     _______________________________________________
> >     devel mailing list
> >     devel at rtems.org <mailto:devel at rtems.org>
> >     http://lists.rtems.org/mailman/listinfo/devel
> >
> >
> > _______________________________________________
> > devel mailing list
> > devel at rtems.org
> > http://lists.rtems.org/mailman/listinfo/devel
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20201105/1e4118cb/attachment.html>


More information about the devel mailing list