Skip to content

What's up with broadcasting over dictionaries and NamedTuple's is reserved #30836

@mauro3

Description

@mauro3

Is there a consensus on what to do about broadcasting named tuples and dicts? Currently (Julia 1.1):

julia> sin.((a=1,))
ERROR: ArgumentError: broadcasting over dictionaries and `NamedTuple`s is reserved

I'm asking because I'm pondering to make structs defined with @with_kw of Parameters.jl automatically not broadcast mauro3/Parameters.jl#70. However, it would also be nice, if named tuples and dicts would work as drop-in for @with_kw structs. Thus, will they broadcast as scalars or as containers?

x-ref: #26212; add milestone?

Metadata

Metadata

Assignees

No one assigned

    Labels

    broadcastApplying a function over a collectioncollectionsData structures holding multiple items, e.g. sets

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions