Alice ML team members Andreas Rossberg, Guido Tack & Leif Kornstaedt write about the implications of pickling for higher-order-type systems in their latest paper on HOT Pickles ...and how to serve them.
The need for flexible forms of serialisation arises under many circumstances, e.g. for doing high-level inter-process communication or to achieve persistence. Many languages, including variants of ML, thus offer pickling as a system service, but usually in a both unsafe and inexpressive manner, so that its use is discouraged. In contrast, safe generic pickling plays a central role in the design and implementation of Alice ML: components are defined as pickles, and modules can be exchanged between processes using pickling. For that purpose, pickling has to be higher-order and typed (HOT), i.e. embrace code mobility and involve runtime type checks for safety.
The paper makes the point that pickling should be considered an important aspect for programming language design. By making pickles first class, a number of related problems in open programming (serialization, distribution, modularity) can be directly addressed.