Why aren't patterns allowed in “use” bindings?
问题 According to the spec, a use binding requires an identifier (unlike let ) instead of a pattern. Why is this? Here's an example of a scenario that doesn't work. type Disposable = Resource of IDisposable let f disposable = use (Resource d) = disposable //ERROR: 'use' bindings must be of the form 'use <var> = <expr>' () 回答1: I think the likely answer is that lots of patterns don't make sense. For instance, how would you expect the compiler to handle the following code? type DisposablePair =