In Julia, why is @printf a macro instead of a function?
Taking a variable number of arguments is not a problem for normal Julia functions [1]. @printf is a macro so that it can parse and interpret the format string at compile time and generate custom code for that specific format string. People may not realize that C’s printf function re-parses and re-interprets the format string … Read more