Skip to content

RFC: typed array conveniences - #47

Open
dherman wants to merge 2 commits into
mainfrom
typed-array-conveniences
Open

RFC: typed array conveniences#47
dherman wants to merge 2 commits into
mainfrom
typed-array-conveniences

Conversation

@dherman

@dherman dherman commented Jul 24, 2022

Copy link
Copy Markdown
Contributor

This RFC defines a number of missing convenience APIs for typed arrays: constructors and metadata queries.

Implementation: neon-bindings/neon#909

Rendered

@kjvalencik kjvalencik left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This design looks really great! I'm exited for the flexibility this provides.

I left some of my thoughts.

Comment thread text/0000-typed-array-conveniences.md Outdated
Comment thread text/0000-typed-array-conveniences.md Outdated
Comment thread text/0000-typed-array-conveniences.md
Comment thread text/0000-typed-array-conveniences.md Outdated
Comment thread text/0000-typed-array-conveniences.md Outdated
Comment thread text/0000-typed-array-conveniences.md
Comment thread text/0000-typed-array-conveniences.md
- len()/offset()/size() instead of len()/byte_offset()/byte_length()
- Handle::region() and Region::to_typed_array() take &self
- to_region() -> region()
- add JsArrayBuffer::region() convenience for docs purposes
- neon::types::binary -> neon::types::buffer
- document the alternative idea of compositional regions and why we didn't choose it

@kjvalencik kjvalencik left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❤️ this design!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants