You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 1, 2024. It is now read-only.
I like sprintf1() as a dynamy/performance compromise for @printf, but it's not a drop-in replacement.
When working in a print-ecosystem, you end up doing things like print(io,sprintf(frmt,x)), which unnecessarily generates a string.
I don't know the best way to implement a fprintf1 function without reusing a lot of code, but from what I've seen the most common way to do this kind of thing is to have fprintf be the base function, have sprintf use fprintf on an IOBuffer to generate the string.
I like
sprintf1()as a dynamy/performance compromise for@printf, but it's not a drop-in replacement.When working in a print-ecosystem, you end up doing things like
print(io,sprintf(frmt,x)), which unnecessarily generates a string.I don't know the best way to implement a
fprintf1function without reusing a lot of code, but from what I've seen the most common way to do this kind of thing is to havefprintfbe the base function, havesprintfusefprintfon anIOBufferto generate the string.Is there a strong reason to not do this?