May 2022
Intermediate to advanced
356 pages
6h 45m
English
In this chapter, we are going to explore the world of metaprogramming. Metaprogramming can be a great way to DRY up your code by consolidating boilerplate code into reusable chunks, or by processing data at compile time to generate additional code. First, we are going to take a look at the core piece of this feature: macros.
We will cover the following topics in this chapter:
By the end of this chapter, you will be able to understand when and how macros can be applied to reduce the amount of boilerplate code in an application.
For this chapter, you will need a working installation of Crystal.
You can refer to Chapter 1
Read now
Unlock full access