-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
No unmodifiable map or set views #11256
Comments
See http://api.dartlang.org/docs/releases/latest/unmodifiable_collection.html Though I have no idea why the list is in dart:collection, but the rest are in package:unmodifiable_collection |
This comment was originally written by [email protected] Unmodifiable Set and Map should exist in the dart collections. The "unmodifiable_collection" library is deprecated. |
Can we delete unmodifiable_collection? Lasse, what do you think? cc @lrhn. |
This comment was originally written by [email protected] I'm not sure if that's the best thing to do. @sathladd, the unmodifiable set and map are still not in dart:collections. I think they should be added though. |
I guess we can delete the "unmodifible_collection", "sequence_zip" and "collection_helpers" directories from the pkg directory in the repository. They are discontinued and deprecated, and if we ever need to do a bugfix on them anyway, we can download them from pub. The packages are still on pub, and should stay there for existing code that uses them. The classes themselves are in the non-deprecated package:collection/wrappers, so new code should use that instead (which is what the deprecation message says). |
Thanks for the update. I filed https://code.google.com/p/dart/issues/detail?id=16528 to track. Before we delete, we might want to ensure their READMEs make it very clear the user should go get package:collection instead. I haven't checked, just making a note. |
I think we can close this? |
Indeed. Added Fixed label. |
This was harder to find than it should have been : found via #236 (comment) |
@sethladd @lrhn @trinarytree Looks like we're still missing UnmodifiableSetView? Should this be reopened? Thanks. |
I found http://api.dartlang.org/docs/releases/latest/dart_collection/UnmodifiableListView.html but I didn't find an equivalent for Map or Set.
For consistency and parity, it would be nice to have a way to give a map or a set to someone and know they can't change its contents.
The text was updated successfully, but these errors were encountered: