News for hackers. Stuff that matters.
Re:A Gentle Introduction to Rust by tempodox on Thursday April 12, 2018 @04:18AM (#16818930)
What makes Rust still rather inaccessible for me is the difficulty in finding «functions I can apply to an argument of type X» and «functions that return a value of type Y» other than, “read every last bit of API doc about everything and memorize it”.
Re:A Gentle Introduction to Rust by fredmorcos on Thursday April 12, 2018 @04:40AM (#16819032)
When you search in the API documentation, you will find 3 tabs at the top: "In Names", "In Parameters" and "In Return Types".

Example: https://doc.rust-lang.org/std/?search=option

Re:A Gentle Introduction to Rust by masklinn on Thursday April 12, 2018 @06:00AM (#16819352)
The official docs have limited support for it, if you search for i32[0] the default facet is "in names" but you can use the "in parameters" and "in return types" tabs for these. I don't know how well these handle abstract types and it's nowhere near hoogle convenience, but there you are (there were efforts to port/replicate hoogle a few years back but the few I remember seem to have been abandoned, specifying a search syntax is probably non-trivial as well given Rust's signatures are not as convenient as Haskell's there)/

[0] https://doc.rust-lang.org/std/?search=i32

Re:A Gentle Introduction to Rust by tuukkah on Thursday April 12, 2018 @04:29AM (#16818984)
That would be what Hoogle is for Haskell: https://www.haskell.org/hoogle/

Could you start by grepping API docs?

Re:A Gentle Introduction to Rust by tempodox on Thursday April 12, 2018 @04:36AM (#16819017)
> grepping API docs

Of course, but that's still painfully slow and awkward. It's exactly the kind of repetitive crap we programmers are born to automate.