Skip to content

Feature request: Add syntactic sugar for covariant actual type parameters #6984

Closed

Description

As per discussion in https://groups.google.com/forum/#!topic/julia-users/alavN8tRdyI :
Let e.g.

Array{<:Real}

act like RArray given by

typealias RArray{T<:Real} Array{T}

This convenient shortcut should go a long way in those cases where people would want covariant types.

The type parameter of Array{<:Real} might become anonymous or hidden; it probably doesn't matter so much since you would rarely re-provide it, e.g. Array{<:Real}{Int}.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    julepJulia Enhancement Proposal

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions