No, the language specification explicitly says no:
primary-constr-args : attributesopt accessopt (simple-pat, ... , simplepat) simple-pat : | ident | simple-pat : type
As already noted, secondary constructors allow parameters that are consistent with the sample, but the difference with the main designer is each of the main parameters, both a function parameter and a private field declaration.
If F # allowed pattern matching here, there would be some patterns that would violate this one-parameter relationship.
type DestructureInCtor(SingleCaseUnion _) =
or:
type DestructureInCtor((a:int, b:int)) =
It is possible that this might work, but I assume that the complexity of resolving pattern matching can be expanded to provide field declarations that outweigh the benefits.
source share