Open cloudRoutine opened 7 years ago
In my opinion the bigger annoyance is that a use expression can't even be bound to _ (single underscore), so if I want to use multiple uses, I need to write something like use _1 = CreateSomeDisposable() use 2 = CreateSomeDisposable() If I could instead bind it to the wildcard character , then I would be happy: use = CreateSomeDisposable() use = CreateSomeDisposable()
allow use to not bind the expression to a name [12838449]
Submitted by Gauthier Segay on 3/7/2016 12:00:00 AM
[ 6 votes ]
In C#, one can use using(CreateSomeDisposable()) without binding the expression to a name. Same construct in F# is not allowed, forcing a workaround such as use __ = CreateSomeDisposable() allow to make it like this: use CreateSomeDisposable()