Hacker News new | ask | show | jobs
by nextlevelwizard 1060 days ago
for my smooth brain `map(this, to_that)` makes better sense than `to_this.map(that)`

same with give me `min(of_this)` instead of `of_this_want.min()`

1 comments

Agree to a big extent. Rust has lots of methods, because their traits work best or most habitually with methods. So I see a comparison of Rust x.min(y) vs Python min(x, y).

The Rust x.min(y) to me is so asymmetric. min(x, y) conveys the symmetry of the operation much better, x and y are both just elements. (And the latter is how it can be used in Python. In Rust, you can call Ord::min(x, y) to get the symmetry back, but it is less favoured right now for some reason.)