Developing operators and functions for Unicon
Unicon is a very high-level language with many built-in features. For such languages, it will make sense to do some engineering work to simplify creating its runtime system. The purpose of this section is to share a bit about how this was done for Unicon, for comparison purposes. Unicon’s operators and built-in functions are implemented using RTL, which stands for Runtime Language.
RTL is a superset of C developed by Ken Walker to facilitate type inference in the Icon runtime system; Unicon inherits it from Icon. RTL writes out C code, so it is almost a very specialized form of C preprocessor that maintains a database in support of type inferencing.
Operators and functions in RTL look like C code, with many pieces of special syntax. There is syntax support for associating different pieces of C code, depending on the data type of the operands. To allow for type inferencing, the Unicon result type that’s produced by...