Online / 5 & 6 February 2022


Use (and Abuse?) of Ada 2022 Features in Designing a JSON-like Data Structure

Ada 2022 is around the corner with many goodies in the form of new features and featurettes. Arguably small syntax sugar additions combine for the programmer's comfort, like for example user-defined literals and container aggregates, that allow natural initialization of user-defined containers with the same expressions used for basic arrays since the beginnings of Ada. In this talk, I discuss how these features allow the initialization of a container data type for heterogeneous values (a-la JSON) without the need of crutch functions (like the usual "+"). Such an structure could be used for compiled-in definitions but, more ambitiously, a relatively simple parser for a strict subset of Ada could leverage this data structure for natural-looking (to the Ada programmer) configuration files. Such configuration files could be useful for tools that are strictly Ada-oriented, written by and for Ada programmers.


Photo of Alejandro R. Mosteo Alejandro R. Mosteo