4 ms·
Compare MDN's entry for the `map` method https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map https://developer.mozilla.o
by sjsanc 3y ago
Compare MDN's entry for the `map` method
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...
With Rust's
https://doc.rust-lang.org/std/iter/struct.Map.html https://doc.rust-lang.org/std/iter/struct.Map.html
I find MDN to be a bit clearer, and they benefit from the in-browser runtime. All the extra detail in the Rust docs (blanket traits etc) were quite intimidating and distracting when I first started learning it.
- timvisee 3y agoThat MDN page has a lot of noise and is not straight to the point. I guess that may be a side effect of JS though.
- lucideer 3y agoWhile both of these docs are pretty good, as someone who normally much prefers API references to "how to" formats, the MDN's "how to" approach here is succinct & just enough to cover reasonable bases, while the Rust API ref list is a bit too terse by comparison (& the Read More click out is a bit annoying).
- recursive 3y agoWhere's the noise? I'm not seeing any.
- ndriscoll 3y agoYou linked to the docs for the result type of `map`, not`map` itself. The method is here: https://doc.rust-lang.org/std/iter/trait.Iterator.html#method.map https://doc.rust-lang.org/std/iter/trait.Iterator.html#metho...