Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Many lambda parameters #15

Open
nojaf opened this issue Dec 19, 2020 · 1 comment · May be fixed by #22
Open

Many lambda parameters #15

nojaf opened this issue Dec 19, 2020 · 1 comment · May be fixed by #22

Comments

@nojaf
Copy link
Contributor

nojaf commented Dec 19, 2020

What would happen in the following code snippet?

module MyModule =

    let foo: Foo -> Foo =
        BigLongTypee.doStuff<aaaaaaaaaaaaa, bbbbbb, BigLongTypee> (fun aaa bbbbbb (CCC ccc) ddddddddddd (EEEE eee) (FFF fff) ggggg ->
            failwith "Not important"
        )
@Smaug123
Copy link
Contributor

Smaug123 commented Jan 19, 2021

Sorry, I completely missed this!

With a sufficiently short line length, I think the following:

    let foo : Foo -> Foo =
        BigLongTypee.doStuff<
                aaaaaaaaaaaaa,
                bbbbbb,
                BigLongTypee
            >
            (fun aaa
                bbbbbb
                (CCC ccc)
                ddddddddddd
                (EEEE eee)
                (FFF fff)
                ggggg
                 ->
                failwith "Not important"
            )

The very last thing to break over lines is the generic type parameters, ideally; they only break if they absolutely must.

I haven't discussed this with the team yet, though, so this is not totally certain. It never really comes up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants