In this article, I will show you how to do metaprogramming in Scala. We will implement memoization annotation that will rewrite our function by adding caching mechanism inside of it. Our tools will be Scalameta and Macro paradise plugin. But let’s start from the definition of metaprogramming.

Metaprogramming is a programming technique in which computer programs have the ability to treat programs as their data.

The most boring thing I can imagine it’s talking about abstract stuff. So let’s find a real life case! If you writing functional code, probably you will have a lot of pure functions, their output…

Arthur Kushka

I am working on React JS based framework for VR apps at Facebook. http://archdev.me

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store