Blog Series: DSLs

#1

https://blog.yoshuawuyts.com/dsls-1/

3 Likes
#2

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).

2 Likes
#3

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

#4

DSLs II: Challenges – https://blog.yoshuawuyts.com/2019-03-03-dsls-2/

1 Like