There are a bunch of things in this package that were experiments that didn't really lead anywhere. Now its getting more widely used as a dependency we should probably simplify it to reduce confusion.
names: we don't actually need to keep the name on GPU, we should ditch the Name constructor and just make names nothing in Adapt.adapt. So they can just be Nothing or Symbol.
Metadata: its good to have this, but others have mentioned just Dict/NamedTuple is simpler. The problem of identifying the metadata context in dispatch (Rasters does use this a lot) can be done with special fields of the metadata as run-time values.
Unalligned dimensions are more complicated than was needed in practice, some code can be deleted
Other things?
Edit: reducing compile time should be the other main goal of this - the less type complexity, the less recompilaton. Some type complexity is unavoidable e.g. if we want lookups to be fast, we need type information. But we can remove the avoidable complexity.
There are a bunch of things in this package that were experiments that didn't really lead anywhere. Now its getting more widely used as a dependency we should probably simplify it to reduce confusion.
Name
constructor and just make namesnothing
inAdapt.adapt
. So they can just beNothing
orSymbol
.Dict
/NamedTuple
is simpler. The problem of identifying the metadata context in dispatch (Rasters does use this a lot) can be done with special fields of the metadata as run-time values.Other things?
Edit: reducing compile time should be the other main goal of this - the less type complexity, the less recompilaton. Some type complexity is unavoidable e.g. if we want lookups to be fast, we need type information. But we can remove the avoidable complexity.