4 ms·
I have left more comments on this thread than I should considering my lack of experience with Rust, but I think the comparison with Scala is valid. What got me
by lukaslalinsky 10y ago
I have left more comments on this thread than I should considering my lack of experience with Rust, but I think the comparison with Scala is valid.
What got me thinking about that was the implementation of into_par_iter, which is a trait implemented on a bunch of standard types, not unlike implicit methods in Scala. I know this is rare code, but reading this left with very similar feeling that I had when reading Scala standard library code:
https://github.com/nikomatsakis/rayon/blob/master/src/par_iter/collections.rs https://github.com/nikomatsakis/rayon/blob/master/src/par_it...
- Manishearth 10y agoBeing able to extend other types with methods is a pretty common feature in many languages, many of which are much less magic than Scala. It's very common in functional languages with objects.