News for hackers. Stuff that matters.
Re:Implementing Rust's dbg! in Python by da39a3ee on Friday December 11, 2020 @01:08PM (#25388695)
The one thing I wasn't sure that I liked with rust's dbg! is that I was typically passing the argument by value, but that sometimes works and sometimes fails the borrow checker. But now reading https://github.com/rust-lang/rust/issues/59943 I see that this is a feature -- I hadn't been taking advantage of the fact that you can use dbg! inline; I'd just been adding extra dbg!(foo) lines to the code. So I should probably (a) pass by reference always and (b) look our for where inline dbg! might be useful (probably lots).

There are no comments on this comment yet.