Binding a disposable with let is a common requirement if you're authoring libraries.
I find the current warning _very_ valuable. If you never use "new", the warning effectively tells you whenever you allocate something that's disposable, and also provides a simple way in your code to see all uses of disposable.
21 votesReed Copsey, Jr. shared this idea ·
I'd very much like this - and have run into this issue with WPF myself.
My preference would to allow this via an attribute like many other features - something like:
interface [<ImplicitInterface>] ISomeInterface with
member __.Foo = 42
This would align with how [<AbstractClass>] and similar are handled.
179 votesplanned · Adminfsharporg-lang (F# Software Foundation Language Group, F# Software Foundation) responded
Approved in principle (and has been for a while), please see RFC FS-1001 https://github.com/fsharp/FSharpLangDesign/blob/master/RFCs/FS-1001-StringInterpolation.md
Don Syme, F# Language Evolution