_set_value!(w, key, val) = w[key] = val

Is this equivalent to the function

function _set_value!(w, key, val)
       w[key] = val
end 

Yes

2 Likes

Note the expression A[3] = 2 gets turned into a function call to Base.setindex!:

julia> A = zeros(5)
5-element Vector{Float64}:
 0.0
 0.0
 0.0
 0.0
 0.0

julia> function f(A)
           A[3] = 2
       end
f (generic function with 1 method)

julia> @code_lowered f(A)
CodeInfo(
1 ─     Base.setindex!(A, 2, 3)
└──     return 2
)