Array operators using multiple dispatch: a design methodology for array implementations in dynamic languages
Jeff Bezanson, Jiahao Chen, Stefan Karpinski, Viral Shah, Alan Edelman

TL;DR
This paper introduces a novel approach using multiple dispatch in dynamic languages, specifically Julia, to implement flexible yet analyzable array operations, balancing performance and user-defined behavior.
Contribution
It proposes a design methodology leveraging multiple dispatch for array implementations, enhancing flexibility and compiler analysis in dynamic languages.
Findings
Enables user-defined array behaviors with good performance.
Simplifies implementation of array indexing functions.
Facilitates consistent behavior across user and standard library types.
Abstract
Arrays are such a rich and fundamental data type that they tend to be built into a language, either in the compiler or in a large low-level library. Defining this functionality at the user level instead provides greater flexibility for application domains not envisioned by the language designer. Only a few languages, such as C++ and Haskell, provide the necessary power to define -dimensional arrays, but these systems rely on compile-time abstraction, sacrificing some flexibility. In contrast, dynamic languages make it straightforward for the user to define any behavior they might want, but at the possible expense of performance. As part of the Julia language project, we have developed an approach that yields a novel trade-off between flexibility and compile-time analysis. The core abstraction we use is multiple dispatch. We have come to believe that while multiple dispatch has not…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsParallel Computing and Optimization Techniques · Logic, programming, and type systems · Embedded Systems Design Techniques
