If ordinary functions could be used as patterns it would save having to write trivial active patterns like
let (|NotEmpty|_|) s = Seq.tryPick Some s
and would, hypothetically, allow
let s = seq []
match s with
| Seq.tryPick Some -> ...
| _ -> //empty
This would make functions more reusable, removing the need for "patternizing" functions you want to use with matching:
let f x = if x then Some() else None
let (|F|_|) = f
I know active patterns may be called as functions, so the previous example could be simplified by defining the pattern only. But forgoing the special pattern syntax simplifies this.
What are the reasons for the special syntax?
EDIT
In the following the active pattern shadows the literal.
[<Literal>]
let X = 1
let (|X|_|) x = if x = 0 then Some() else None
match 0 with //returns true
| X -> true
| _ -> false
Why wouldn't that work for function calls within patterns also?
EDIT 2
I found a scenario that would be ambiguous
let zero n = if n = 0 then Some() else None
match 0 with
| zero -> //function call or capture?
This, in my mind, clarifies why an active pattern must begin with an uppercase letter--it makes the intention clearer and makes shadowing, such as in my previous example, much less likely.