In this chapter, we present various advanced programming topics in Julia.
We start by introducing metaprogramming for manipulating the Abstract Syntax Tree (AST) of parsed Julia code, and we use this approach for writing macros. We show how to specify user-defined types—complex and primitive. Finally, we focus on important language features that affect code execution speed. We present static arrays—a mechanism built on the base of generating functions that can greatly increase the speed of array operations. We discuss how performance is affected by the use of mutable and immutable data types and data type stability.