New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
format-args/ #13
Comments
For Pieces::String, I think it's a good idea to use a NonEmptyString instead of &'static str so that compiler can take advantages of that niche and reduce the size of enum, since the const string should never be empty. |
This made me recall a |
This is really cool work. Thank you for doing it. I'm really curious to see how it all works out over time. As someone who does some embedded Rust, I'm excited that it might soon be reasonable for me to use |
Great read and fantastic work! |
Thanks a lot for the work and the great blog post. I wonder if it would be possible to avoid using Ideally, I would like to have something like Right now, I believe the only way to do this is via I was surprised to read the code snippet you gave in the "Closures" section, as It would be really nice if one of these solutions existed though, as I believe in lots of cases, usage of |
Great writeup and great work! Would it be possible to use your closure approach only in the release profile (or above a certain opt level)? Would that enable fast debug builds and fast runtime? Or is the compile time blow up too bad even for release builds? |
Typo in the pose:
I guess it should be s/compiles/compiler/ |
very nice article! |
Behind the Scenes of Rust String Formatting: format_args!() - Mara's Blog
The fmt::Arguments type is one of my favorite types in the Rust standard library. It’s not particularly amazing, but it is a great building block that is indirectly used in nearly every Rust program. This type, together with the format_args!() macro, is the power behind print!(), format!(), log::info!() and many more text formatting macros, both from the standard library and community crates.
In this blog post, we learn how it works, how it is implemented today, and how that might change in the future.
https://blog.m-ou.se/format-args/
The text was updated successfully, but these errors were encountered: