Following up on the previous issue, I'd like to see a small section about what to do with multiline body expressions in let and member bindings.
Example:
if a is long or multiline it should be placed on the next line with an indent.
regardless of what SynExpr a ends up being.
Some examples I consider bad:
let a = """
foobar, long string
"""
let b = async {
return () // not following the other CE samples
}
let c = {
Name = "Bilbo"
Age = 112
}
let d = while f do
printfn "%A" x
From my (technical) point of view, the only a few SynExpr that can start right after the = sign and it strikes me as inconsistent to have these.
The only one I could find in the current guide is:
let rec sizeLambda acc = function
| Abs(x, body) -> sizeLambda (succ acc) body
| App(lam1, lam2) -> sizeLambda (sizeLambda acc lam1) lam2
| Var v -> succ acc
As MatchLambda is only 1 of 63 SynExpr cases, this just seems like not worth having.
Following up on the previous issue, I'd like to see a small section about what to do with multiline body expressions in let and member bindings.
Example:
if a is long or multiline it should be placed on the next line with an indent.
regardless of what SynExpr a ends up being.
Some examples I consider bad:
From my (technical) point of view, the only a few SynExpr that can start right after the
=sign and it strikes me as inconsistent to have these.The only one I could find in the current guide is:
As
MatchLambdais only 1 of 63SynExprcases, this just seems like not worth having.