Skip to content

feature request: kwargs for getindex #25631

Closed
@vtjnash

Description

Current behavior is to treat = as assignment inside []

julia> Meta.@lower x[a=1] = 3
:(begin
      a = 1
      setindex!(x, 3, 1)
      return 3
  end)

But for consistency with (), I would like to have it parse as a kwcall

setindex!(x, 3; a=1)

Currently, that has to be written:

x[(a = 1,)] = 3

which is much less nice.

Metadata

Assignees

No one assigned

    Labels

    parserLanguage parsing and surface syntax

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions