A Brief Critique of The Collection Library
Scala owes part of its renown to a rich library of generic algorithms and data structures, known as the collection library. The role of this library is to provide common types and vocabulary to manipulate data structures in a wide variety of different applications, ranging from simple command-line tools to high-performance webservices.
The success and versatility of the collection library is hard to understate, not only in the Scala ecosystem but also in a broader context, to the point that few programming languages can claim to be on par. Nonetheless, as this year marks the seventh anniversary of its latest major revision, it may be interesting to revisit its design in light of recent developments in Scala and elsewhere.
The purpose of this talk is to set the stage for such an inquiry. We will present a few friction points in the collection library and quickly review three other successful collection frameworks from two other programming languages, namely C++ and Swift, to identify interesting ideas that Scala may potentially reuse to address these issues.