@@ -208,21 +208,23 @@ Reference implementation is given in this repository, see the
208
208
209
209
## Unresolved questions
210
210
211
- 1. Should we expose immutable collection implementations to the public API? Current experience shows
211
+ 1. Should we distinguish immutable and persistent collection interfaces and implementations?
212
+ 2. Should we provide sorted maps and sets?
213
+ 3. Should we expose immutable collection implementations to the public API? Current experience shows
212
214
that it's not mandatory.
213
- 2 . Immutable map provides `keys`, `entries` sets and `values` collection.
215
+ 4 . Immutable map provides `keys`, `entries` sets and `values` collection.
214
216
Should these collections be also immutable, or just read-only is enough?
215
217
Note that their implementations are not persistent and most of their
216
218
modification operations require to make a copy of the collection.
217
- 3 . `Map - key` operation: we do not support such operation for read-only maps, and for mutable maps we
219
+ 5 . `Map - key` operation: we do not support such operation for read-only maps, and for mutable maps we
218
220
can do `MutableMap.keys -= key`. What would be the analogous operation for `ImmutableMap`?
219
- 4. `mutate` extension: should the action take `MutableList` as a receiver
221
+ - *Resolution:* these operators are implemented in the standard library, so it's fine to implement the same for immutable maps.
222
+ 6. `mutate` extension: should the action take `MutableList` as a receiver
220
223
or as a parameter (`this` or `it` inside lambda)?
221
- 5 . `immutableMapOf<K,V>().builder()` requires explicit specification of K and V type arguments
224
+ 7 . `immutableMapOf<K,V>().builder()` requires explicit specification of K and V type arguments
222
225
(until the common type inference system is implemented) and is quite lengthy.
223
226
Should we provide some shortcut to infer types from expected map type?
224
227
225
-
226
228
## Future advancements
227
229
228
230
* Provide other immutable collection interfaces such as `ImmutableStack` and `ImmutableQueue`
0 commit comments