Skip to content

Conversation

andyferris
Copy link
Member

To address #26, we need some way of getting constant values in a comprehension like

function f{N}(::SomeType{N})
    ...
    vec = @SVector [2x for x = 1:N]
    ...
end

Here I play with new types StaticIndex{Idx,T} and the much simpler StaticOneTo{N}. The latter is hooked into the SVector macro to achieve the above. These ideas need generalizing and making robust, and I'd appreciate any opinions on how we might want to deal with statically valued arrays?

Used for more powerful comprehension in @svector
@andyferris
Copy link
Member Author

any opinions on how we might want to deal with statically valued arrays?

E.g. Is statically-valued worth its own type tree like StaticArray, complete with many generic methods? What is the interface? Is it a trait?

@timholy @c42f

@c42f
Copy link
Member

c42f commented Aug 1, 2019

I think this is superseded by #150 ? Please reopen if I'm wrong!

@c42f c42f closed this Aug 1, 2019
@c42f c42f added design speculative design related issue feature features and feature requests labels Aug 1, 2019
oschulz pushed a commit to oschulz/StaticArrays.jl that referenced this pull request Apr 4, 2023
Rename and generalize foreachcolumn
@andreasnoack andreasnoack deleted the StaticRanges branch June 24, 2025 06:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

design speculative design related issue feature features and feature requests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants