# recent broadcast changes (iterate by default), scalar struct, and \`@.\`

**URL:** <https://discourse.julialang.org/t/recent-broadcast-changes-iterate-by-default-scalar-struct-and/11178>\
**Category:** Internals & Design\
**Tags:** broadcast\
**Created:** [May 27, 2018, 3:48am UTC](https://discourse.julialang.org/t/recent-broadcast-changes-iterate-by-default-scalar-struct-and/11178 "2018-05-27T03:48:05Z")\
**Posts on this page:** 1\
**Showing post:** 12

<div class="post-metadata">

**Author:** ![mbauman](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mbauman/32/31082_2.png) [@mbauman](https://discourse.julialang.org/u/mbauman)\
**Post date:** [May 28, 2018, 2:51pm UTC](https://discourse.julialang.org/t/recent-broadcast-changes-iterate-by-default-scalar-struct-and/11178/12 "2018-05-28T14:51:29Z")

</div>

Thanks for bringing this up — it’s a very good point that the suggested deprecation simply won’t work in a `@.` deprecation. There are several alternatives, but they all have their downsides:

- You can protect the `Ref` from being dotted by using `$Ref` like was suggested above. This is a special syntax that just applies to the macro, though, so it’s not terribly intuitive.
- You can also use a tuple literal like `@. f(x, (y,))` to treat `y` kind-of like a scalar. For most purposes this should be just as fast and scalar-like as a `Ref`, but it’s not 100% scalar-like: if `x` is scalar-like or a zero-dimensional array, `f.(x, Ref(y))` will return an unwrapped scalar, whereas `f.(x, (y,))` will return a 1-tuple. Some array types might also not support broadcasting with tuples as nicely as they do scalars.

The solution here, I think, will be a special syntax that will work everywhere to put values in a `Ref`. We’ve been talking about `&y`. That’s currently available and would make for a better alternative all around.

---

_[View the full topic](https://discourse.julialang.org/t/recent-broadcast-changes-iterate-by-default-scalar-struct-and/11178)._
