Skip to content

StaticArrays.SUnitRange <: AbstractUnitRange should be true? #978

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

Open
hyrodium opened this issue Dec 13, 2021 · 1 comment
Open

StaticArrays.SUnitRange <: AbstractUnitRange should be true? #978

hyrodium opened this issue Dec 13, 2021 · 1 comment

Comments

@hyrodium
Copy link
Collaborator

Here's a small example.

julia> Base.OneTo <: AbstractUnitRange
true

julia> Base.UnitRange <: AbstractUnitRange
true

julia> StaticArrays.SOneTo <: AbstractUnitRange
true

julia> StaticArrays.SUnitRange <: AbstractUnitRange
false

Related comment: #855 (comment)

I think we have the following choices.

  • Make abstract subtype StaticUnitRange for static range and make hierarchy SUnitRange <: StaticUnitRange <: AbstractUnitRange and SOneTo <: StaticUnitRange <: AbstractUnitRange.
  • Move SOneTo <: AbstractUnitRange to SOneTo <: StaticArray.

I prefer the first. Are there any thoughts on this?

@hyrodium
Copy link
Collaborator Author

x-ref: #150 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant