Skip to content
Branch: master
Find file Copy path
Find file Copy path
2 contributors

Users who have contributed to this file

@voronoipotato @dsyme
74 lines (53 sloc) 1.71 KB

F# RFC FS-1070 - Offside relaxations for constructors and members

The design suggestion Allow undentation for constructors has been marked "approved in principle". This RFC covers the detailed proposal for this suggestion and some related design relaxations.


F#'s indentation rules are overly stringent for the argument lists of implicit constructors and static methods. This relaxs the rules for these cases by adding some permitted "undentations".

Code Examples

For example, currently these all give a indentation warnings:

type OffsideCheck(a:int,
        b:int, c:int,  // warning offside of '('
        d:int) =


type OffsideCheck(a:int,
   b:int, c:int,  // warning offside of '('
   d:int) =


    static member M(a:int,
        b:int, c:int, // warning offside of 'member'
        d:int) = 1


type C() = 
    static member P with get() = 
      1 // warning -- offside of 'member'

In all the above cases an andentation is added.

Detailed Design

TBD. Each newly permitted undenation is declarative in the implementation, and simply needs to be translated into the terminology used in the F# language spec.

Code samples

See above




The main alternative is "don't do this" and continue to require indentation.


This is a non-breaking change.

Unresolved questions


You can’t perform that action at this time.