Podoba Ci się to?
type MyType(x:int, s:string) =
public new() = MyType(42,"forty-two")
member this.X = x
member this.S = s
let foo = new MyType(1,"one")
let bar = new MyType()
printfn "%d %s" foo.X foo.S
printfn "%d %s" bar.X bar.S
Jest to typowy sposób na zrobienie tego. Niech konstruktor "najbardziej parametryczny" będzie niejawnym konstruktorem, a reszta będzie "nowym" przeciążeniem zdefiniowanym jako członkowie klasy, która wywołuje niejawny konstruktor.
EDIT
Jest to błąd w Beta2 dotyczące klas abstrakcyjnych. W niektórych okolicznościach można obejść przy użyciu domyślnych argumentów na niejawny konstruktor, a la
[<AbstractClass>]
type MyType(?cx:int, ?cs:string) =
let x = defaultArg cx 42
let s = defaultArg cs "forty-two"
member this.X = x
member this.S = s
abstract member Foo : int -> int
type YourType(x,s) =
inherit MyType(x,s)
override this.Foo z = z + 1
type TheirType() =
inherit MyType()
override this.Foo z = z + 1
let foo = new YourType(1,"one")
let bar = new TheirType()
printfn "%d %s" foo.X foo.S
printfn "%d %s" bar.X bar.S
+1: „parameterfull” :) – Juliet