You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Consider marking the IAsyncResult interface and the AsyncResult class as obsolete and deprecate them in favor of the modern task-based asynchronous pattern.
Then in the future remove all APIs dependent on that interface. This would clean up the API substantially.
I understand that some APIs need to be obsoleted because they are fundamentally broken, unsecure or not working. I can also accept that an API can lead to so bad and widespread practices, that the benefits of reducing its usage outweigh compatibility.
I don't see how IAsyncResult meets this bar though. Both are valid and working patterns. Obsoletion should not be taken lightly and using it to prefer one pattern over another seems inappropriate. Pattern preference is driven by many factors - subjective opinion, conventions, compatibility requirements - and changes over time.
Based on the types of APIs we've been marking as [Obsolete] since introducing "better obsoletion," I agree with @miloush that IAsyncResult does not meet the bar for obsoletion. It would be very disruptive without enough benefit to justify the disruption.
Activity
omariom commentedon Nov 16, 2018
And break a lot of existing libraries.
karelz commentedon Nov 16, 2018
We could consider soft deprecation: https://github.com/dotnet/platform-compat
vanillajonathan commentedon Nov 16, 2018
They could target an old version of the .NET Standard.
Yes, or even an option to hide them from IntelliSense and the online API documentation.
Sebazzz commentedon Nov 21, 2018
.NET Standard will not removed APIs, only add them.
vanillajonathan commentedon Dec 3, 2018
Could also be hidden using the
EditorBrowsableState.Neverattribute.miloush commentedon Aug 15, 2020
I understand that some APIs need to be obsoleted because they are fundamentally broken, unsecure or not working. I can also accept that an API can lead to so bad and widespread practices, that the benefits of reducing its usage outweigh compatibility.
I don't see how
IAsyncResultmeets this bar though. Both are valid and working patterns. Obsoletion should not be taken lightly and using it to prefer one pattern over another seems inappropriate. Pattern preference is driven by many factors - subjective opinion, conventions, compatibility requirements - and changes over time.jeffhandley commentedon Aug 1, 2021
Based on the types of APIs we've been marking as
[Obsolete]since introducing "better obsoletion," I agree with @miloush thatIAsyncResultdoes not meet the bar for obsoletion. It would be very disruptive without enough benefit to justify the disruption.