2 ms·
Looks like Rust is missing something like hoogle. The language's types are barely powerful enough for it to add value, but it's certainly on the "adds value" si
by marcosdumay 5y ago
Looks like Rust is missing something like hoogle. The language's types are barely powerful enough for it to add value, but it's certainly on the "adds value" side of the divide.
- Ar-Curunir 5y agoI think rustdoc supports a weak version of type-directed search.
- masklinn 5y agoI would agree. rustdoc does support a hoogle-like syntax (in a rustdoc page click on the question mark next to the search field for shortcut and "search tricks"), sadly it's not very good. Rust does add a few wrinkles due to its "type policy" being less regular though e.g. how you handle `self`, as well as the various types of references. For instance let's say you have impl Foo { fn foo(&self, p: &Path) -> usize } Does this match `Foo, Path -> usize` or `Path -> usize`? Or both? Or neither (because references). This also outlines a second issue which is whether `Deref` should be involved in the search (so e.g. should `PathBuf -> usize` find this).