motoko
motoko copied to clipboard
feat: random-access indexing into `Blob`
TODO:
- [x] compiler for
get - [x] desugar
blob[i]toget(other way 'round!) - [x]
blob.keys() - [x] documentation
- [x]
Changelog.md
Comparing from 6ecc76fccef0eb59528562c4c133a650e24f0ad0 to 0a912241ad313171cf0bdb1136173701cc1cb336: In terms of gas, no changes are observed in 5 tests. In terms of size, no changes are observed in 5 tests.
Related to https://github.com/dfinity/motoko/issues/966
Should we consider that issue closed by this PR, or could we at least use it as an opportunity to define a list of operations we'd like to see on Blob?
I'm not saying we shouldn't just asking for the motivation given that we have syntax for indexing (now for blobs too) and assignment.
We want parity with [T].