onflow / atree

Atree provides scalable arrays and scalable ordered maps.
https://onflow.org
Apache License 2.0
39 stars 16 forks source link

`Array.Get()` should return `Value` instead of `Storable` #315

Closed fxamacker closed 1 year ago

fxamacker commented 1 year ago

Issue To Be Solved

Currently, Array.Get() returns Storable and client converts returned Storable to Value. However, it only makes sense to return Storable if client needs to remove register (slab) by StorageID (StorageIDStorable).

Get() should only provide Value without possibility of client manipulating the underlying Storable.

Suggested Solution

Change Array.Get() to return Value instead of Storable.

This is prep work for Atree Register Inlining (#292) and will also harden the API.