queryverse / IteratorInterfaceExtensions.jl

Traits for julia iterators
Other
11 stars 3 forks source link

suggestion: static iterator size trait #13

Open tpapp opened 3 years ago

tpapp commented 3 years ago

I am proposing that another trait is added to IteratorSize2 to indicate that size is known statically, ie encoded in the result type.

Practical application is collecting into something like a StaticArrays.SArray or similar.

Bikeshedding the name is welcome, HasStaticLength and HasStaticShape could work.

davidanthoff commented 3 years ago

I think that would require us to create IteratorSize3, though, because adding something is a breaking change.

What is the scenario for this? The primary (if not only) use case for the stuff in this package so far has been queryverse related, and I think there I don't really see a use for this. But maybe there are some other cases?

tpapp commented 3 years ago

I was assuming that this package is for general use, but if it is mainly for the Queryverse ecosystem, then I guess there isn't much of a use case; feel free to close.

davidanthoff commented 3 years ago

I mean, I'd be happy if others want to use this package as well, I think just so far it has only been used for Queryverse. Happy to add other use-cases, but it would be good to understand what it would enable and how it would be used first.