--
You received this message because you are subscribed to the Google Groups "elixir-lang-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elixir-lang-ta...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Why is :io.format/2 not satisfying?
The thing I dislike is the ~
Most new languages have adopted sprintf syntax, and I always feel like I'm traveling back to 1986 when I use io:format
But that doesn't answer the original post.
Would there be any support for a native Elixir sprintf?
Dave
>>> '{:*^30}'.format('centered') # use '*' as a fill char '***********centered***********'
> Would there be any support for a native Elixir sprintf?
I wonder what you mean by native support. Sprintf is just a function, so you can write it today. If you mean adding fancy syntax support inside #{}, I don't think that'll happen.
Sometimes you want the string returned not printed to stdout.