18163, "ronawho", "Should we have factory functions to create arrays?", "2021-08-05T00:09:51Z"
We have factory functions that can create bytes from a pointer:
createBytesWithBorrowedBuffer
createBytesWithOwnedBuffer
createBytesWithNewBuffer
We also have similar ones for strings. I think we should add something like this for arrays. We have makeArrayFromPtr from the 'external' array support, which can be used but that's not user-facing or stable. Here I'm thinking of something user-facing and more consistent with the bytes/string versions where we create an array from either a pointer or bytes. Note that for arrays we'll also want to provide a way to specify the domain, so the interface won't be exactly the same. Maybe something like: