Skip to content

Feature request: Allow syntax @SVector 2:N-1 #223

Closed
@DNF2

Description

@DNF2

The @SVector macro currently supports functions like rand, fill and so on. Is it possible to support StepRanges? For example, could

ind = @SVector 2:2:N-1

where N is a type parameter, be allowed?

One use case would be convenient slicing of SArrays, as discussed here, without the need for writing a custom function for each different slice.

This request might be a special case of the comprehension syntax, which cannot currently make use of type parameters.

Metadata

Metadata

Assignees

No one assigned

    Labels

    designspeculative design related issuefeaturefeatures and feature requests

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions