Macros is an actively used design pattern.

?Years Old
  • Macros ranks in the top 50% of entities I track
  • the Macros wikipedia page
  • I have 21 facts about Macros. what would you like to know? email me and let me know how I can help.

Languages without Macros include java, javascript, kotlin

Languages with Macros include c, clojure, cpp, erlang, factor, honu, nim, racket, rust, scheme

Example from c:

Example from clojure:

Example from cpp:

Example from erlang:

-define(Const, Replacement).
-define(Func(Var1,...,VarN), Replacement).

Example from nim:

Example from racket:

Example from rust:

Example from scheme:

Last updated November 21st, 2019