5 ms·
> Tooling improvements For me that's the biggest issue currently with Rust. Type inference via "let" only makes it harder as I can't really know what type a ce
by Shoothe 9y ago
> Tooling improvements
For me that's the biggest issue currently with Rust. Type inference via "let" only makes it harder as I can't really know what type a certain variable or expression is without carefully tracking docs. I've tried two Rust plug-ins for VS Code and even though they installed required dependencies I still couldn't have proper list of members when pressing "dot" and without that I feel like programming in the 90's.
- fnord77 9y agointellij's rust plugin is pretty good at type interference. Also sometimes I just let the compiler tell me by forcing the let variable to something that it is obviously not: `let not_a_string: String = get_something_that_I_have_no_idea();` error [4242]: expected type String, found type &*YouWouldNeverHaveGuessed
- Shoothe 9y ago> Also sometimes I just let the compiler tell me by forcing the let variable to something that it is obviously not: Ha! Very clever! Thanks.
- deleted 9y ago[deleted]
- w4tson 9y agoYou can get feedback before the compiler kicks in by asking IntelliJ to explicitly define the type. It’s a trick I used quite a bit when playing about with rust, and Kotlin actually. Alt + Enter should invoke intentions pop up, you can do it from there. (I think)
- pimeys 9y agoThis works quite well, until you're dealing with stuff such as `AndThen` with 10 different nested futures. Here, again, async/await will be a great help.
- tototomtoboro 9y agoHave you tried https://marketplace.visualstudio.com/items?itemName=rust-lang.rust https://marketplace.visualstudio.com/items?itemName=rust-lan... ? You will need the rls from nightly but its working very nicely for me.
- Shoothe 9y agoNope, I'll try that out tomorrow, thanks for the advice! VS Code's handling of TypeScript really spoiled me but on the other hand it seems like tooling becomes more and more important in programming languages (e.g. Roslyn).
- Shoothe 9y agoRust (rls) works! Excellent. Maybe the Rust team should have a recommended tools page? (obviously curated)