Blog Series: DSLs



Note regarding string formatting:

Rust’s string formatting is quite rich. Values can be repeated, padded, shifted, delimited and more. But no runtime cost is paid for this as all the logic is encoded during compilation, making this a zero-overhead abstraction.

This does not match my understanding of core::fmt. The big design goal was to compile fast. There is quite large runtime performance overhead (sometimes 6x, as demonstrated by itoa and dtoa) and quite large overhead in binary size (see rust-embedded/wg#18).


Oh, I wasn’t aware. Thanks for clarifying!


DSLs II: Challenges –

1 Like