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

Mark Enumerable methods with the PureAttribute #33414

Closed
Evangelink opened this issue Mar 10, 2020 · 6 comments
Closed

Mark Enumerable methods with the PureAttribute #33414

Evangelink opened this issue Mar 10, 2020 · 6 comments
Labels
area-System.Linq question Answer questions and provide assistance, not an issue with source code or documentation. untriaged New issue has not been triaged by the area owner

Comments

@Evangelink
Copy link
Member

Hello,

Looking at dotnet/roslyn-analyzers#3363 I have realized that the System.Linq.Enumerable methods are not marked with the PureAttribute which seems odd to me. Is there an obvious reason I am missing?

@Dotnet-GitSync-Bot
Copy link
Collaborator

I couldn't add an area label to this Issue.

Checkout this page to find out which area owner to ping, or please add exactly one area label to help train me in the future.

@Dotnet-GitSync-Bot Dotnet-GitSync-Bot added the untriaged New issue has not been triaged by the area owner label Mar 10, 2020
@Evangelink
Copy link
Member Author

Tagging @eiriktsarpalis @adamsitnik as requested by @Dotnet-GitSync-Bot

@stephentoub
Copy link
Member

Mainly because [Pure] is part of the Contracts APIs, which we've stopped using in general across the core libraries. We've not gone through and purged existing usage of Pure, but we also haven't been adding it to new APIs in the last many years.

@Evangelink
Copy link
Member Author

I see! I wasn't aware this was somehow "deprecated". Are you planning to have any kind of replacement? I see a lot of places where an attribute gives some metadata and helps building analyzers.

@stephentoub
Copy link
Member

Are you planning to have any kind of replacement?

Not currently. Being able to reason about what kind of mutations code might or might not perform is certainly interesting, but it's also non-trivial; [Pure] only scraped the surface. For example, see the whole "Permissions" section in the write-up here: http://joeduffyblog.com/2016/11/30/15-years-of-concurrency/.

@eiriktsarpalis
Copy link
Member

Great article, thanks for sharing.

@stephentoub stephentoub added the question Answer questions and provide assistance, not an issue with source code or documentation. label Mar 13, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Dec 10, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-System.Linq question Answer questions and provide assistance, not an issue with source code or documentation. untriaged New issue has not been triaged by the area owner
Projects
None yet
Development

No branches or pull requests

4 participants