DimensionalData.jl icon indicating copy to clipboard operation
DimensionalData.jl copied to clipboard

Clean up complexity

Open rafaqz opened this issue 2 years ago • 2 comments

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.

rafaqz avatar Sep 15 '23 09:09 rafaqz

Just a comment here: from experience, having a mix of nothings and something else, usually leads to type code instabilities.

lazarusA avatar Sep 15 '23 09:09 lazarusA

And more compile time... maybe we can use Symbol("") as the default?

rafaqz avatar Sep 15 '23 09:09 rafaqz