Computing Reviews

Records with rank polymorphism
Slepak J., Shivers O., Manolios P.  ARRAY 2019 (Proceedings of the 6th ACM SIGPLAN International Workshop on Libraries, Languages and Compilers for Array Programming, Phoenix, AZ, Jun 22, 2019)80-92,2019.Type:Proceedings
Date Reviewed: 12/27/19

Most modern libraries for data manipulation transparently handle data with different shapes. For example, in Python’s NumPy, a simple multiplication may be performed across scalars, or complex collections of scalars (for example, collections of matrices or tensors). As such, instead of explicitly iterating over each scalar, one should instead multiply the collections of scalars directly. The iteration is therefore transparently performed, with the possibility to enjoy the presence of a graphics processing unit (GPU) to speed up the execution.

This mechanism, pretty common in programming languages and application programming interfaces (APIs) designed to manipulate data (such as R and NumPy), can be generalized into the notion of rank polymorphism. The benefits of rank polymorphism are numerous: collections of elements are transparently and efficiently handled, and the necessary code to manipulate the collections is significantly shorter than when explicitly iterating. As such, the code necessary to manipulate data is less error prone.

This paper provides a simple and clean design of rank polymorphism. Although this paper belongs to the programming language area, it is very readable and no formalism is presented. It presents numerous examples and illustrative situations of the benefits of rank polymorphism. It compares three approaches using different syntax flavor: Racket, Standard ML, and Python.

There is a clear trend to make programming languages more fit to manipulate large amounts of data. However, most of the approaches appear to be designed in an ad hoc fashion. This paper details some constructions that will look particularly appealing to programming language designers. The expected readership of this paper is broad, mainly because of the relevance of the topic and ease of reading.

Reviewer:  Alexandre Bergel Review #: CR146821 (2004-0079)

Reproduction in whole or in part without permission is prohibited.   Copyright 2024 ComputingReviews.com™
Terms of Use
| Privacy Policy