-
Notifications
You must be signed in to change notification settings - Fork 62
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
Deeply immutable binary data #134
Comments
As an initial pass, BigInt can hold binary data, and it's also a primitive. I'd be interested in exploring primitive types for other things too, but it would be best in the context of understanding for which cases BigInt falls short. |
@littledan I think we might be talking past each other here. I'll try to elaborate on specific use case I had in mind. https://ipfs.io/ uses cryptographic content identifiers (CID) to address content in the network (spec, js implementation). As name implies it's identifier derived from content (hash) so by definition it's immutable, also being identifier it is used all over the place and handful of utility functions e.g.
Have some form of immutable shared array buffer could address outlined problems in systems like ipfs, or many other distributed / p2p systems for that matter. |
Thanks, it's helpful to have these concrete use cases to understand better. Could you elaborate on what makes BigInt not a suitable way to represent binary data? This would help me understand what is needed. |
Please check out https://github.com/Jack-Works/proposal-freeze-arraybuffer-and-readonly-view thanks. I hope it can be integrated with R&T |
In order to focus on changes that are necessary to finish this proposal, we are closing issues related to follow-on proposals. You are free to continue the discussion here and reference it in other venues. |
Today only binary data (other then Blob) is mutable and only way to efficiently share it across threads imposes transferring underlying
ArrayBuffer
in which case it becomes detached on the sender thread.It would be really great to consider immutable binary data as part of this effort, which would make it possible to share data (efficiently) across threads without having to copy or transfer it.
The text was updated successfully, but these errors were encountered: