Should `PbList` and `PbMap` provide a `deepCopy` method?
Open
feature request
question
- Dominant language
- Dart
- Stars
- 572
- Forks
- 196
- Avg merge
- 1h 59m
- Merged PRs (30d)
- 2
Description
I realized while refactoring a use site that `PbMap` and `PbList` don't provide a `deepCopy` method and users have to implement their own deep copy functions.
For `PbList`, we provide a constructor `PbList.from(List from)` for shallow copy, but deep copying needs to be implemented by the user.
For `PbMap`, we don't provide a shallow constructor or a `deepCopy` method.
I think it might make sense to add:
- `PbMap.deepCopy`, `PbList.deepCopy`
- `PbMap` constructor for shallow copying, for consistency with `PbList`
Contributor guide
Assessment
This issue has not been assessed yet.