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 https://github.com/mauro3/Parameters.jl/issues/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?
Hasn't been much development along these lines lately, but I know I'd be excited to see a behavior like #24019 which would broadcast functions over values and match keys.
I'd _not_ be excited about them broadcasting as scalars.
Edit: see also https://github.com/JuliaLang/julia/issues/25904 and https://github.com/JuliaLang/julia/issues/5794.
Sounds good. Thanks for the quick reply!
Most helpful comment
Hasn't been much development along these lines lately, but I know I'd be excited to see a behavior like #24019 which would broadcast functions over values and match keys.
I'd _not_ be excited about them broadcasting as scalars.
Edit: see also https://github.com/JuliaLang/julia/issues/25904 and https://github.com/JuliaLang/julia/issues/5794.