By metaprogramming, we refer to the ability of a program to interact with its own code, where the code itself is represented in the data structures of that language. In Julia, this powerful functionality is available on many levels. In this recipe, we will introduce metaprogramming concepts by showing how Julia struct data types can be generated automatically on the base of input data. This example could be useful in situations where some data has a structure which is not known in advance and subsequently needs to be processed and stored in Julia data structures.
Metaprogramming
Getting ready
For this recipe, no package installation is required. Simply start the Julia command line.
In the GitHub repository for this recipe...