[Blog Post] Crystal Lang: What are Macros and how are they useful?

The Crystal Programming Language includes a feature called Macros. As described by the Crystal Documentation “Macros are methods that receive AST nodes at compile-time and produce code that is pasted into a program.”, to simplify this means you can write code that writes more code. This post is a deep-dive into how to write macros and why they’re useful.

I did this writeup a few days ago on using Crystal macros, they’re overlooked by people new to the language but they are quite useful. Would appreciate any feedback or corrections the community has on this :slight_smile:


Nice! Thanks

1 Like

This is awesome. Thanks!


I get a 404 error on the link
is it cross posted somewhere else like Medium or Dev.to ??

1 Like

Sorry about that my blog is being restructured meanwhile it’s https://lunoriandotis.wordpress.com/2019/05/25/crystal-lang-what-are-macros-and-how-are-they-useful/


1 Like

@nsuchy still a 404 :(

Should be fixed. Something got ***ed up in my apache2 configuration. Sorry about that!