JuliaLang/julia — pull request #9243 by one-more-minute (2014-12-03 18:49:26+00:00)
Title: Macro expand step for (s)printf

This just makes `@printf` and `@sprintf` macroexpand their arguments. I don't think there should be any horrible consequences to changing the order of macro expansion, but we could always check that the expression is a macro call before doing this and/or only replace those that expand to strings.

The idea of this is to allow, for example
```julia
macro fmt()
"%.2d"
end
@sprintf(@fmt, n)
```
Which is obviously useful when you want to use the same format string more than once.