Re:Python: Uncovering the Overlooked Core Functionalities
by kzrdude on Tuesday July 25, 2023 @04:57PM
(#36869408)
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.)
same with give me `min(of_this)` instead of `of_this_want.min()`