"bearophile" <bearophileh...@lycos.com> wrote in message news:lkplokawtyisvwhvf...@forum.dlang.org... > The introduction of UFCS in D offers new ways to format D code, especially > when your code uses many high order functions. What is a good layout of > the D code in such situations? I have tried several alternative layouts, > and in the end I found to appreciate a layout similar to the one used in > F# code. Below I show a kind of extreme example :-) > [...] > > auto t = "table.txt" > .File() > .byLine() > .map!(r => r.removechars("^01".dup))() > .array(); > > const transposed = t[0] > .length > .iota() > .map!(i => t.transversal(i).array())() > .array(); > > (t ~ [(char[]).init] ~ transposed) > .map!(r => r > .group() > .filter!(p => p[0] == '1')() > .map!(p => p[1].text())() > .join(" ") > )() > .join("\n") > .writeln(); > } > >
That's basically what I do, except I always indent by exactly one tab.