Meta-programming guide

I’ve written up the notes I took while learning basic concepts:

It is far from complete, and maybe needs to be split up into several pages.

Please feel very welcome to do some community editing magic and knock this into shape. If it’s hassle to do PRs, feel welcome to hand me a splat of text in the JuliaLang gitter and I will stick it in.

Maybe it can evolve into a proper learning resource…

I will keep nudging it as my own understanding improves.

Suggestions / feedback / content gladly received!


PS Is there a better category for this?

PPS I’ve also put it up here: Documentation - Stack Overflow just because it’s easier for people to make edits I think. (I never figured out how to edit a GitHub project wiki) at time of writing it needs a couple of reviews before it goes visible.


I’m not sure how to do a PR against a wiki on github (if it’s possible?).

So I figured I try to point out here that should be mostly fixed now by on v0.6 master.

Also, in the example, you don’t want to call esc(:(@util)) there since you want the hygienic macrocall, not the non-hygienic one. (only block and condition should be wrapped in esc).

Similarly for, you don’t want to call esc(:!), only the block and condition should be wrapped in esc.

1 Like

DUH the wiki was only editable by myself.

I’ve flipped the switch. Now everyone can edit.

And please do!

Note that the bottom third hasn’t yet been structured / organised / polished. I need to go through that properly at some point (or someone does).