Skip to content

Allow undentation for constructors #724

@charlesroddie

Description

@charlesroddie

It's good to be able to move 4 characters to the right to get to the next level and leads to smart code where lines generally start at a indentation which is a multiple of 4. This works well with tooling (Tab/shift-tab).

However in constructors, full indentation is required. So when defining types, the length of the type name determines how far to the right inputs must be positioned:

open System
type SixAccessViolations(a:AccessViolationException,
                         b:AccessViolationException,
                         c:AccessViolationException,
                         d:AccessViolationException,
                         e:AccessViolationException,
                         f:AccessViolationException) =
    class end

Undentation is not allowed:

type SixAccessViolations(a:AccessViolationException,
        b:AccessViolationException, c:AccessViolationException,
        d:AccessViolationException, e:AccessViolationException,
        f:AccessViolationException) =
    class end

Function inputs allow undentation (and it's explicitly in the F# spec):

let sixAccessViolations =
    SixAccessViolations(accessViolation,
        accessViolation, accessViolation,
        accessViolation, accessViolation,
        accessViolation)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions