lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


I was wondering whether there was any standard on typed arrays in the works, similar to what _javascript_ offers.

Of course, there are several libraries that provide this functionality, but the main use of typed arrays that I have isn't so much for computing/scripting with them (they are nice for that to be sure), but for interoperability between libraries with different array types: if each library knows how to convert to/from a standard typed array, interoperability becomes much easier.

The ideal library might go a bit beyond the JS facility and allow both owned storage and pointing to already allocated storage in an existing structure (the user of the library would have to make sure that that's safe), and would provide array descriptors allowing for non-standard strides.  But even a simple, standard 1D dense vector would greatly improve interoperability.

T