Skip to content

Clarify the default values for newly created LiveMap and LiveCounter#478

Merged
sacOO7 merged 1 commit into
mainfrom
clarify-zero-value-objects-v2
May 21, 2026
Merged

Clarify the default values for newly created LiveMap and LiveCounter#478
sacOO7 merged 1 commit into
mainfrom
clarify-zero-value-objects-v2

Conversation

@sacOO7
Copy link
Copy Markdown
Collaborator

@sacOO7 sacOO7 commented May 19, 2026

@sacOO7
Copy link
Copy Markdown
Collaborator Author

sacOO7 commented May 19, 2026

I had a question

  1. We already have zero-value references in the codebase ( both ably-js and ably-java AFAIK), so do we want to keep existing terminology or adapt to new one?
  2. If we adapt to new one ( default value or a new object ), do we also need to update relevant references in all codebases. If we keep implementation spec-agnostic, then it will differ across SDKs for zero-value objects
  3. Maybe replacing zero-value object with empty object would make more sense?

@sacOO7
Copy link
Copy Markdown
Collaborator Author

sacOO7 commented May 19, 2026

I had a question

  1. We already have zero-value references in the codebase ( both ably-js and ably-java AFAIK), so do we want to keep existing terminology or adapt to new one?
  2. If we adapt to new one ( default value or a new object ), do we also need to update relevant references in all codebases. If we keep implementation spec-agnostic, then it will differ across SDKs for zero-value objects
  3. Maybe replacing zero-value object with empty object would make more sense?

Validated all public facing liveobject docs for zero-value, zero value terminology

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.

ZERO_VALUE_LIVEOBJECTS_REVIEW.md

@sacOO7
Copy link
Copy Markdown
Collaborator Author

sacOO7 commented May 20, 2026

Updated PR as per discussion here -> 286024e

Comment thread specifications/objects-features.md Outdated
Comment thread specifications/objects-features.md Outdated
@lawrence-forooghian
Copy link
Copy Markdown
Collaborator

@sacOO7 just a couple of minor comments, and please could you squash commits before merge?

@github-actions github-actions Bot temporarily deployed to staging/pull/478 May 20, 2026 19:02 Inactive
@sacOO7 sacOO7 force-pushed the clarify-zero-value-objects-v2 branch from 9881332 to d0de4ca Compare May 20, 2026 19:02
@github-actions github-actions Bot temporarily deployed to staging/pull/478 May 20, 2026 19:03 Inactive
@sacOO7
Copy link
Copy Markdown
Collaborator Author

sacOO7 commented May 20, 2026

@sacOO7 just a couple of minor comments, and please could you squash commits before merge?

Fixed d0de4ca

Comment thread specifications/objects-features.md Outdated
@github-actions github-actions Bot temporarily deployed to staging/pull/478 May 21, 2026 17:40 Inactive
Restructures RTLM4 and RTLC4 to specify the constructor parameters and
default attribute values for newly created LiveMap and LiveCounter
objects, and removes the "zero-value" terminology in favor of explicit
references to these clauses.

- RTLC4: defines `objectId` constructor parameter and `data` default of 0
- RTLM4: defines `objectId` and optional `semantics` (default LWW)
  constructor parameters, with `data` defaulting to an empty map and
  `clearTimeserial` to `null`
- Updates RTO3b1, RTO4b2, RTO5c1b1a/b, RTO6, RTO9a2a1, RTLO4e4 and
  RTLM7g1 to reference the new wording and pass `objectId` (and
  `semantics` where applicable) into the constructors

Co-authored-by: Lawrence Forooghian <53756884+lawrence-forooghian@users.noreply.github.com>
@sacOO7 sacOO7 merged commit 515c57b into main May 21, 2026
2 checks passed
@sacOO7 sacOO7 deleted the clarify-zero-value-objects-v2 branch May 21, 2026 17:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants