Le samedi 12 avril 2014 à 04:11 -0700, Mike Innes a écrit : > That @sprintf is a macro sort of explains why using a run-time value > doesn't work in the same way, but it isn't really the reason since > @sprintf(fmt, val) could work in principle – it would just have to > delegate to a function if its argument isn't a compile-time string. > > > > If using a run-time string is particularly useful to you, I'd suggest > opening an issue about this, since it appears to be missing > functionality.
I had argued printf() and sprintf() should be functions taking non-standard string literals, instead of being macros. Then you could also pass them a (let's say) Format object created at runtime if needed. But I didn't have a concrete use case -- maybe you have one. See https://github.com/JuliaLang/julia/issues/5747 Regards
