-
Notifications
You must be signed in to change notification settings - Fork 145
Open
Labels
Description
This is a suggestion regarding position of operators in chained expressions
starting from:
if
long-thing &&
another-long-thing &&
another-long-thing &&
another-long-thing
thenI generally feel it is actually better (especially with long things) to put the operator in a leading position on the next line:
if
long-thing
&& another-long-thing
&& another-long-thing
&& another-long-thing
thenThe same rule could be extended for , as well.
let a =
long-thing,
another-long-thing,
another-long-thinglet a =
long-thing
, another-long-thing
, another-long-thingNote that F# users tend to use |> operator in such manner.
Also, most languages using "fluent notation" (chaining method calls), would put the . operator in leading position of next line
a
.Something()
.AnotherThing()I've consistently felt it is more readable, easier to extend code, in many languages, using this type of positioning.
heronbpv, jasiozet, kspeakman, josh-degraw, iamim and 1 moreauduchinok, JustinWick, vzarytovskii and krauthaufen