Robert Schenck Troels discusses AUTOMAP in Futhark, a feature inspired by NumPy-style broadcasting to simplify code involving higher-dimensional arguments. Initially viewed as a simple feature, it turned out to be complex yet elegant. AUTOMAP aims to make mathematical code cleaner by automatically handling lifting of scalar operations. By inserting maps and reps, Futhark achieves rank-correct function applications in a statically-typed setting, challenging due to parametric polymorphism. Their strategy involves minimizing inserted maps and reps, with user intervention required in ambiguous cases. Overall, AUTOMAP in Futhark offers rank polymorphism, enabling implicit maps and reps for clearer code. Static rank polymorphism is a difficult yet rewarding endeavor.
https://futhark-lang.org/blog/2024-06-17-automap.html