[Rosettacode] D code line length limit

Jonathan M Davis via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Thu May 8 00:08:31 PDT 2014


On Wed, 07 May 2014 18:51:58 +0000
Meta via Digitalmars-d-learn <digitalmars-d-learn at puremagic.com> wrote:

> On Wednesday, 7 May 2014 at 14:40:37 UTC, Jonathan M Davis via
> Digitalmars-d-learn wrote:
> > My eyes... Oh, how that hurts readibily.
>
> While I agree that
>
> pure @safe @nogc nothrow
> void doSomething(int n)
> {
> }
>
> is quite ugly, it is really not much worse than
>
> void doSomething(int n) pure @safe @nogc nothrow
> {
> }
>
> I would argue that the latter hurts readability more, as parsing
> meaning from long lines is difficult for humans. Also, we can
> always go deeper ;-)

Actually, I find the second version perfectly readable, and I think that it is
by far the best way for that function signature to be written, whereas I find
the first one to be much, much harder to read. But ultimately, this sort of
thing pretty much always ends up being highly subjective.

- Jonathan M Davis


More information about the Digitalmars-d-learn mailing list