Skip to content

Make ScopedValues.get a method of Base.get #54553

Open

Description

ScopedValues.get(::ScopedValues.ScopedValue) performs a very similar role as Base.get(collection, index, default) and I think they should have the same API and name, i.e. rename ScopedValues.get to Base.get and make its API conform to the Base get API.

Right now, ScopedValues.get is it's own generic function, distinct from Base.getindex and from Base.get.

ScopedValues was introduced in 1.11, so this needs to be done before the 1.11 release if we want to do it at all.

Reading #50958, I don't see any explicit discussion about this name, but perhaps I'm missing something.

cc @vchuravy

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

Metadata

Assignees

No one assigned

    Labels

    designDesign of APIs or of the language itselftriageThis should be discussed on a triage call

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions