© Sandeep Nagar 2017

Sandeep Nagar, Beginning Julia Programming, https://doi.org/10.1007/978-1-4842-3171-5_14

14. Metaprogramming

Sandeep Nagar

(1)New York, USA

14.1 Introduction

Metaprogramming is one of the most powerful features of the Julia programming language. Crudely speaking, metaprogramming is about Julia code controlling other parts of source files to an extent that it can modify them and control their execution. To understand this process, you must understand the way Julia code is executed. Broadly speaking, there are two stages of Julia code execution:

  • Making an Abstract Syntax Tree

    • Julia code is parsed in the form that is suitable for evaluation.

  • Evaluation

    • The parsed code is executed by the compiler.

Metaprogramming is about modifying ...

Get Beginning Julia Programming: For Engineers and Scientists now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.