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

No unmodifiable map or set views #11256

Closed
sethladd opened this issue Jun 12, 2013 · 10 comments
Closed

No unmodifiable map or set views #11256

sethladd opened this issue Jun 12, 2013 · 10 comments
Labels
area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. type-enhancement A request for a change that isn't a bug

Comments

@sethladd
Copy link
Contributor

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.

@justinfagnani
Copy link
Contributor

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

@DartBot
Copy link

DartBot commented Feb 4, 2014

This comment was originally written by [email protected]


Unmodifiable Set and Map should exist in the dart collections. The "unmodifiable_collection" library is deprecated.

@sethladd
Copy link
Contributor Author

sethladd commented Feb 4, 2014

Can we delete unmodifiable_collection? Lasse, what do you think?


cc @lrhn.

@DartBot
Copy link

DartBot commented Feb 4, 2014

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.

@lrhn
Copy link
Member

lrhn commented Feb 4, 2014

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).

@sethladd
Copy link
Contributor Author

sethladd commented Feb 4, 2014

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.

@sethladd
Copy link
Contributor Author

I think we can close this?

@lrhn
Copy link
Member

lrhn commented Mar 18, 2014

Indeed.


Added Fixed label.

@sethladd sethladd added Type-Enhancement area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. labels Mar 18, 2014
@kevmoo kevmoo added type-enhancement A request for a change that isn't a bug and removed type-enhancement labels Mar 1, 2016
@patkujawa-wf
Copy link

This was harder to find than it should have been :
UnmodifiableMapView class - dart:collection library - Dart API

found via #236 (comment)

@dave26199
Copy link

@sethladd @lrhn @trinarytree Looks like we're still missing UnmodifiableSetView? Should this be reopened? Thanks.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

7 participants