Clarify the default values for newly created LiveMap and LiveCounter#478
Clarify the default values for newly created LiveMap and LiveCounter#478sacOO7 wants to merge 3 commits into
Conversation
sacOO7
commented
May 19, 2026
- Based on Clarify the default values for newly created LiveMap and LiveCounter in RTLM4 and RTLC4 #361
- Remove the term "zero-value" object as it is an unnecessary detail that simply describes a newly created object according to RTLM4 and RTLC4
|
I had a question
|
Validated all public facing liveobject docs for We found => The "zero-value" terminology is purely a spec-internal artefact that was never surfaced in public-facing documentation. The docs already use the user-friendly phrasings ("empty map", "initial value 0", "newly created object", "initial state") that the spec PR is migrating toward, so the public surface is already coherent with the new wording. |
|
Updated PR as per discussion here -> 286024e |
| - `(RTO4b)` If the `HAS_OBJECTS` flag is 0 or there is no `flags` field, the sync sequence must be considered complete immediately, and the client library must perform the following actions in order: | ||
| - `(RTO4b1)` All objects except the one with id `root` must be removed from the internal `ObjectsPool` | ||
| - `(RTO4b2)` The data for the `LiveMap` with id `root` must be cleared by setting it to a zero-value per [RTLM4](#RTLM4). Note that the client SDK must not create a new `LiveMap` instance with id `root`; it must only clear the internal data of the existing `LiveMap` with id `root` | ||
| - `(RTO4b2)` The data for the `LiveMap` with id `root` must be cleared by setting it to an empty map per [RTLM4c](#RTLM4c). Note that the client SDK must not create a new `LiveMap` instance with id `root`; it must only clear the internal data of the existing `LiveMap` with id `root` |
There was a problem hiding this comment.
| - `(RTO4b2)` The data for the `LiveMap` with id `root` must be cleared by setting it to an empty map per [RTLM4c](#RTLM4c). Note that the client SDK must not create a new `LiveMap` instance with id `root`; it must only clear the internal data of the existing `LiveMap` with id `root` | |
| - `(RTO4b2)` The data for the `LiveMap` with id `root` must be cleared by setting it to the value described in [RTLM4c](#RTLM4c). Note that the client SDK must not create a new `LiveMap` instance with id `root`; it must only clear the internal data of the existing `LiveMap` with id `root` |
There was a problem hiding this comment.
We don't really set any value as per RTLM4c. Being explicit, we clear/get rid of all values from the map.
Do you think wording gets misleading here?
There was a problem hiding this comment.
RTLM4c describes a particular value for data (i.e. an empty map); we're saying to set it to that value
There was a problem hiding this comment.
again as mentioned in the other comment we can even lose the word "clear"
There was a problem hiding this comment.
Addressed, removed cleared keyword d0de4ca
| - `(RTLO4e3b)` This clause has been replaced by [RTLO6b](#RTLO6b) | ||
| - `(RTLO4e3b1)` This clause has been replaced by [RTLO6b1](#RTLO6b1) | ||
| - `(RTLO4e4)` Set the data for the `LiveObject` to a zero-value, as described in [RTLC4](#RTLC4) or [RTLM4](#RTLM4) depending on the object type | ||
| - `(RTLO4e4)` Clear the internal data of the `LiveObject` as described in [RTLC4b](#RTLC4b) or [RTLM4c](#RTLM4c), depending on the object type |
There was a problem hiding this comment.
| - `(RTLO4e4)` Clear the internal data of the `LiveObject` as described in [RTLC4b](#RTLC4b) or [RTLM4c](#RTLM4c), depending on the object type | |
| - `(RTLO4e4)` Clear the internal data of the `LiveObject` by setting it to the value described in [RTLC4b](#RTLC4b) or [RTLM4c](#RTLM4c), depending on the object type |
There was a problem hiding this comment.
We don't really set any value for either LiveMap or LiveCounter, don't you think it's a bit misleading to say setting it to the value wdyt?
There was a problem hiding this comment.
What do you mean "we don't really set any value" — isn't this spec point saying that you should set the LiveObject's data property to a specific value?
There was a problem hiding this comment.
It could even just lose the word "clear" and say
- `(RTLO4e4)` Set the `data` attribute of the `LiveObject` to the value described in [RTLC4b](#RTLC4b) or [RTLM4c](#RTLM4c), depending on the object type
|
@sacOO7 just a couple of minor comments, and please could you squash commits before merge? |
…in RTLM4 and RTLC4 Also remove the term "zero-value" object as it is an unnecessary detail that simply describes a newly created object according to RTLM4 and RTLC4
9881332 to
d0de4ca
Compare