- Julia 1.0 Programming Complete Reference Guide
- Ivo Balbaert Adrian Salceanu
- 178字
- 2021-06-24 14:21:51
Metaprogramming in Julia
Everything in Julia is an expression that returns a value when executed. Every piece of the program code is internally represented as an ordinary Julia data structure, also called an expression. In this chapter, we will see how, by working on expressions, a Julia program can transform and even generate new code. This is a very powerful characteristic, also called homoiconicity. It inherits this property from Lisp, where code and data are just lists, and where it is commonly referred to with the phrase: Code is data and data is code
.
In homoiconic languages, code can be expressed in terms of the language syntax. This is the case for the Lisp-like family of languages: Lisp, Scheme and, more recently, Clojure, which use s-expressions. Julia is homoiconic, as are others such as Prolog, IO, Rebol, and Red. As such, these are able to generate code during runtime, which can be subsequently executed.
We will explore this metaprogramming power by covering the following topics:
- Expressions and symbols
- Evaluation and interpolation
- Defining macros
- Built-in macros
- Reflection capabilities
- 數字媒體應用教程
- PyQt從入門到精通
- Mastering Articulate Storyline
- Django:Web Development with Python
- C語言最佳實踐
- Oracle數據庫從入門到運維實戰
- 征服RIA
- Mastering Kali Linux for Web Penetration Testing
- 小學生C++創意編程(視頻教學版)
- Unity UI Cookbook
- Create React App 2 Quick Start Guide
- Visual Basic程序設計上機實驗教程
- C++寶典
- 開源項目成功之道
- Lift Application Development Cookbook