With static intro all of this is a macro, while loop, and a switch statement. A fraction of the complexity and you get editor help and typed holes. https://willcrichton.net/notes/type-safe-printf/ … https://github.com/deech/LambdaWorldCadiz2019-WhatFPCanLearnFromStaticIntrospection/blob/master/printf.nim …
That's why Rust doesn't have %d or %s, just {} and {:?}. The Debug/Format traits take care of checking whether an object is convertible to a string.
-
-
To see an example, go to this playground: https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=07ad6d44dd855455c1e444d21357df18 … Then click "Tools > Expand Macros".
-
This is quite similar to how Haskell does it so the pattern is familiar.
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
cognitive psychology. PhD