6 ms·
The queryable expression thing is something I struggle with all the time in Rust. It's especially bad in that language because (unlike in e.g. Java or C#) there
by thurn 2y ago
The queryable expression thing is something I struggle with all the time in Rust. It's especially bad in that language because (unlike in e.g. Java or C#) there is no way to view the Debug representation of your types in the debugger, you just get the raw memory layout which adds a huge barrier to 'what is going on with this code?' and requires you to dig around through countless nested layers to understand it.
- Yoofie 2y agoI also find this super annoying. In C++ land, Microsoft solves this problem by having "natvis" [0] files which allows you to have custom representations of complex & deeply nested objects. Unfortunately, most third-party debuggers don't support it. And like you said, any non-trivial program in Rust is basically not parsible without digger though 50 layers of nested abstractions. [0]: https://learn.microsoft.com/en-us/visualstudio/debugger/create-custom-views-of-native-objects?view=vs-2022 https://learn.microsoft.com/en-us/visualstudio/debugger/crea...