Rust’s new `dbg!()` macro looks pretty useful, I w...
# language-proposals
c
Rust’s new
dbg!()
macro looks pretty useful, I was wondering if it would be possible to replicate it in Kotlin. This would require being able to capture the text form of the expression. https://blog.rust-lang.org/2019/01/17/Rust-1.32.0.html
10
r
I was reading the release notes this morning and thought the same thing, but I'm not sure if the level of "meta-programming" (if you'll pardon the over used and somewhat meaningless term) and preprocessing required would be worth adding. I could be wrong though.
c
That would open the whole macro debate, yes, which I have very mixed feelings about.
r
Indeed, same here
r
That may be a good job for compiler plugin, though I don't recall it having access to source code, so string representation of expression may be unavailable.
2