Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RFC: typed array conveniences #47

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

dherman
Copy link
Contributor

@dherman dherman commented Jul 24, 2022

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

Implementation: neon-bindings/neon#909

Rendered

Copy link
Member

@kjvalencik kjvalencik left a comment

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.

text/0000-typed-array-conveniences.md Outdated Show resolved Hide resolved
text/0000-typed-array-conveniences.md Outdated Show resolved Hide resolved
text/0000-typed-array-conveniences.md Show resolved Hide resolved
text/0000-typed-array-conveniences.md Outdated Show resolved Hide resolved
text/0000-typed-array-conveniences.md Outdated Show resolved Hide resolved
text/0000-typed-array-conveniences.md Show resolved Hide resolved
text/0000-typed-array-conveniences.md Show resolved Hide resolved
- 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
Copy link
Member

@kjvalencik kjvalencik left a comment

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