Skip to content

[JavaScript] Align Buffer read/write API with java #3345

@chaokunyang

Description

@chaokunyang

Feature Request

Align Buffer read/write API with Java naming style

Is your feature request related to a problem? Please describe

Current JavaScript buffer read/write methods do not use read* / write* prefixes. This makes the API less explicit and less consistent with Java and other xlang implementations.

Describe the solution you'd like

Refactor JavaScript buffer APIs to use explicit read* / write* method names.

Requirements:

  • Rename write-side methods (for example int8, int16, uint32) to writeInt8, writeInt16, writeUint32, etc.
  • Rename read-side methods using the same rule (read*).
  • Perform a one-shot breaking rename: do not keep old method names, aliases, or deprecation shims.
  • Update all internal call sites, tests, docs, and examples in the same change.
  • Keep runtime behavior and performance unchanged.

Describe alternatives you've considered

  • Keep old names as aliases during a transition period.

This was rejected. We want a clean one-time migration without compatibility aliases.

Additional context

This issue is specifically for API naming consistency and migration cleanup.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions