Biohazrd icon indicating copy to clipboard operation
Biohazrd copied to clipboard

Consider reworking constant array support to (optionally?) emit nested types

Open PathogenDavid opened this issue 3 years ago • 0 comments

Somewhat related: https://github.com/InfectedLibraries/Biohazrd/issues/137

Having constant arrays being shared isn't going to work well when you're using multiple Biohazrd libraries anyway. It might also be a good idea to support (optionally?) referencing the ConstantArrayEnumerator<T> from a NuGet package. Having them pooled is also annoying when you use Biohazrd to split a C++ library's interop library across multiple assemblies.

It might not be a bad idea to have type reduction emit special ConstantArrayTypeReferences and let a separate transformation worry about how to make them emittable. (That would also support things like emitting C# basic types as C# fixed-size arrays.)

PathogenDavid avatar Jan 20 '21 05:01 PathogenDavid