Skip to content

WIP: static ranges for smarter macro comprehensions #30

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

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
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