Skip to content
This repository was archived by the owner on Oct 24, 2023. It is now read-only.
This repository was archived by the owner on Oct 24, 2023. It is now read-only.

Should implementations or hosts be allowed to observably round up maxByteLength? #23

Closed

Description

@syg

See original motivation in #18.

Should implementations be allowed to observably round maxByteLength for e.g. rounding up to page size multiples? I.e., should the following be allowed?

let rab = new ResizableArrayBuffer(2000, 4000);
console.log(rab.maxByteLength); // 4096

Pro: Simpler implementation for those that want to do rounding, so they don't have to track a 3rd length field internally.

Con: Higher chances of non-interoperability due to differences in rounding modes between engines, exposing engine details. (Can be worked around by prescribing a specific rounding algorithm, but then defeats the flexibility that engines should like to have.)

Activity

  1. codehag commented on Jan 27, 2021

    @codehag
  2. bmeck commented on Jan 27, 2021

    @bmeck
  3. syg commented on Jan 27, 2021

    @syg
    CollaboratorAuthor

    @bmeck That's a good example, but I think that's a better counter-argument to #24. I separated the question about the max length vs the length.

  4. syg commented on Feb 23, 2021

    @syg
    CollaboratorAuthor

    Closed in favor of allowing it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions