Equivalent of Ref in a @. — $Ref?



If I want to simplify a broadcasted call full of .s with @., what is the recommended way of ensuring that certain values are treated as scalars? Eg should I replace Ref with $Ref? MWE:

# setup
a, b = 1, 2
cs = collect(1:10)
f(a, b, c) = a + b + c

# original
cs .= f.(Ref(a), Ref(b), cs)

# @__dot__, is $Ref the simplest way?
@. cs = f($Ref(a), $Ref(b), cs)


Just cross-referencing some previous discussion on this topic: recent broadcast changes (iterate by default), scalar struct, and `@.`


I’m wondering what’s the purpose of using Ref(a) here.
oh, never mind. found the reason in the above link.