Here’s an annoying question: wouldn’t things be easier if the dot-syntax for broadcasting focused on arguments rather than functions?
An example might explain the question better. Assume I have a function
lerp(x::Vector, y::Vector, xx::Number) which takes in data points
x,y and evaluates the linear interpolant at point
xx. Soon enough I will want to evaluate the interpolant at a series of points
lerp.(x,y,xx) won’t work because broadcast tries to zip the three vectors together. Instead, I have to use work-arounds like
(xx->lerp(x,y,xx)).(xx), both of which are a bit annoying. Imagine if I could write this as
lerp(x,y,.xx) where the dot in front of
xx indicates that I only want to broadcast over
xx! This seems more natural and can easily be made backwards compatible by introducing the convention
f.(x,y) === f(.x,.y).