Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate taskSeq<_> in favor of TaskSeq<_> #187

Merged
merged 4 commits into from
Oct 31, 2023

Conversation

abelbraaksma
Copy link
Member

@abelbraaksma abelbraaksma commented Oct 31, 2023

Similar to have the Async<_> and AsyncSeq<_> type aliases work, we should use the Principle of Least Surprise and do the same.

  • When people use the camelCased version, it will always refer to the computation expression: taskSeq { do! ... }
  • When they use the PascalCased version, it will always refer to the asynchronous enumerable type IAsyncEnumerable<_>, in other words, the output of the computation expression and the building block for basically all functions in this library.

The gist of this change is just that this:

type taskSeq<'T> = IAsyncEnumerable<'T>

becomes

type TaskSeq<'T> = IAsyncEnumerable<'T>

This follows from suggestions made in other issues, but I can't find it readily.

We will keep taskSeq<_> around, but it will raise FS0044, a deprecation warning. People can use it just fine by ignoring the warning

From version 0.4.0 onward, 'TaskSeq<_>' is deprecated in favor of 'TaskSeq<_>'. It will be removed in an upcoming release."

@abelbraaksma abelbraaksma changed the title Depreacate taskSeq<_> in favor of TaskSeq<_> Deprecate taskSeq<_> in favor of TaskSeq<_> Oct 31, 2023
@abelbraaksma abelbraaksma force-pushed the change-taskseq-alias-type branch from 44d40bc to 288e5f6 Compare October 31, 2023 11:55
@abelbraaksma abelbraaksma added enhancement New feature or request compatibility Related to backward or forwards, or F# Core or .NET version compatibility labels Oct 31, 2023
@abelbraaksma abelbraaksma merged commit 32c7a47 into main Oct 31, 2023
6 checks passed
@abelbraaksma abelbraaksma deleted the change-taskseq-alias-type branch October 31, 2023 13:32
@abelbraaksma abelbraaksma added this to the v0.4.0 milestone Mar 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compatibility Related to backward or forwards, or F# Core or .NET version compatibility enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant