Re:Understanding Rust futures by going way too deep
by tinco on Monday July 26, 2021 @05:55AM
(#27957554)
In Haskell I used to do this trick where if I wanted to neatly type annotate, but my function had some crazy signature, I'd compile the program, but passing the function into another function in an intentional incorrect way. The compiler would complain "expected A but got B". And I would simply copy B and make it the type annotation :P
Nowadays the editor would help you do that. When I'm coding Rust the editor shows the types inline in a small font, which is very helpful.
Nowadays the editor would help you do that. When I'm coding Rust the editor shows the types inline in a small font, which is very helpful.