[Rosettacode] D code line length limit
Meta via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Wed May 7 11:53:07 PDT 2014
On Wednesday, 7 May 2014 at 18:51:59 UTC, Meta 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 ;-)
>
> extern(C) public static immutable pure nothrow @safe void
> doSomething(int n)
> {
> }
>
> I won't get into the `if` template guards, as those are
> cheating.
That `extern(C) public static immutable pure nothrow @safe`
should be on the same line as the function declaration. The web
interface is ruining my point =)
More information about the Digitalmars-d-learn
mailing list