Summary
In this chapter, we looked at how to define and use annotations to augment various Crystal features with additional metadata, including how to store both named and positional arguments, how to read single and multiple annotations, and what advantages/use cases annotations fulfill over macros.
Annotations are a vital metaprogramming feature that we will definitely make use of in the coming chapters. Up until now, all of the macro code we have written when accessing type or method data has been in the context of that type or method.
In the next chapter, we are going to explore the compile-time type introspection feature of Crystal, which will introduce new ways to access the same information.