-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
similar and traits #18161
Copy link
Copy link
Open
Labels
arrays[a, r, r, a, y, s][a, r, r, a, y, s]designDesign of APIs or of the language itselfDesign of APIs or of the language itselfspeculativeWhether the change will be implemented is speculativeWhether the change will be implemented is speculative
Metadata
Metadata
Assignees
Labels
arrays[a, r, r, a, y, s][a, r, r, a, y, s]designDesign of APIs or of the language itselfDesign of APIs or of the language itselfspeculativeWhether the change will be implemented is speculativeWhether the change will be implemented is speculative
The situation for the
similarfunction feels a little messy these days (perhaps I'm wrong about that and it's all under control, in which case, consider this a documentation request). It seems like thesimilarAPI could be clarified with appropriate traits, e.g.This is sort of already what we're doing but the current system is a bit more ad hoc: type arguments are treated as an implicit element type trait and a tuple of integers is treated collectively as a dimensions trait. It might be fruitful to have a more explicit trait-based core API and translate the various shorthands into that.