Skip to content

Commit bf8b3a6

Browse files
committed
Update unresolved questions in the proposal.
1 parent dd04a05 commit bf8b3a6

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

proposal.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -208,21 +208,23 @@ Reference implementation is given in this repository, see the
208208
209209
## Unresolved questions
210210
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
212214
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.
214216
Should these collections be also immutable, or just read-only is enough?
215217
Note that their implementations are not persistent and most of their
216218
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
218220
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
220223
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
222225
(until the common type inference system is implemented) and is quite lengthy.
223226
Should we provide some shortcut to infer types from expected map type?
224227
225-
226228
## Future advancements
227229
228230
* Provide other immutable collection interfaces such as `ImmutableStack` and `ImmutableQueue`

0 commit comments

Comments
 (0)