On Thu, 8 May 2014 07:32:52 -0700 "H. S. Teoh via Digitalmars-d-learn" <digitalmars-d-learn@puremagic.com> wrote:
> On Thu, May 08, 2014 at 01:59:58AM -0700, Jonathan M Davis via > Digitalmars-d-learn wrote: > > On Thu, 08 May 2014 07:29:08 +0000 > > bearophile via Digitalmars-d-learn > > <digitalmars-d-learn@puremagic.com> wrote: > > > > > Jonathan M Davis: > > > > > > > ultimately, this sort of thing pretty much always ends up being > > > > highly subjective. > > FWIW, for very long function signatures I write it this way: > > const(T)[] myVeryLongFunction(T)(const(T)[] arr, > int x, > int y, > int z, > ExtraArgs extraArgs) > pure @safe nothrow > if (is(T : int) && > someOtherLongCriteria!T && > yetMoreVeryLongCriteria!T) > { > ... > } That's that I do with the params, but I'd still put the attributes to the right of the last param rather than on their own line. I don't think that I'd _ever_ put attributes on their own line. But as always, it's all quite subjective, and everyone seems to prefer something at least slightly different. - Jonathan M Davis