JuliaArrays / JuliaArrays/StaticArrayInterface.jl
Can we contextualize `parent_type`?
Nessuno ha ancora preso questa issue.
- Lingua principale
- Julia
- Stelle
- 14
- Fork
- 8
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
When I made this PR to base some good points were brought up about what we knew about parent(x) compared to x. With a few exceptions (that we should probably clean up), we simply use parent_type as convenient syntax for communicating the type of the underlying data buffer/collection. An informal search through juliahub shows that a handful of packages define something very similar independent of this package, so it's clearly something that has utility already. I'd like to know if we could do better.
The biggest hangup here is how we succinctly describe what assumptions persists between x and parent(x). The only approachable idea I have is a method like is_lazy_wrapper when we can assume that the wrapper type changes nothing. However, that seems extremely limiting and questionably useful.
A more approachable aspect to this is describing the kind of type that is parent_type(x). For example, sub-typing something like BufferStyle with these subtypes:
WrappedBuffer: single wrapped buffer likeSubArray.MultiBuffer: multiple distinct buffers likeTridiagonalComputedBuffer: buffer is computed on the fly and isn't stored in memory (e.g., FillArrays).
However, creating traits for describing parent_type(x) isn't terribly useful until we have a generic approach for doing f(x) = f(parent(x)).
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia leggendo la PR collegata e la discussione della issue su parent(x), parent_type(x) e sulle categorie BufferStyle proposte. Confronta gli esempi indicati —SubArray, Tridiagonal e FillArrays— e determina se è possibile specificare un trait concreto o un design generico f(x) = f(parent(x)). Il lavoro è completato quando si è arrivati a una proposta di interfaccia definita e implementabile.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- julia
- Ambito
- data
- Tipo di issue
- Funzionalità
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Stato di attività
- Ferma
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 20/100