From now on, the experiments will tackle more practical issues and
will add completely new features to the language. There will be less
theory and more examples.
Experiment #7 - Data Formatters
A conversion between different data formats is a frequent operation
in many applications. Dunaj introduces the concept of data formatters
that formalizes the process of converting data from one format into
another.
A formatter is a collective name for Dunaj’s data parser and printer.
A parser converts information from its external or low level
representation (used for storage or communication) into form that is
of higher level of abstraction, and is better understood and supported
by the application. Printer does the opposite thing. Formatters are
not limited to parsing from/printing to strings, but are designed to
work with any type of data, even for binary decoding/encoding.
Goals of this experiment are as follows:
* Provide dedicated functions for parsing and printing that integrate
well with the rest of the API, including transducers
* Provide protocols and helper functions for implementers of custom
data formatters
* Make formatters efficient by utilizing available optimizations