>>the whole language is verbose: compare these 10 lines (https://github.com/andreaferretti/kmeans/blob/935b8966d4fe0d...) with this single line (https://github.com/andreaferretti/kmeans/blob/master/nim/alg...)
The Nim code's more concise in this case but the Rust code can be more clearly written:
impl Add for Point {
type Output = Point;
fn add(self, other: Point) -> Point {
Point(self.0 + other.0, self.1 + other.1)
}
}
The "type Output = Point" line isn't boilerplate, it makes it possible to define the result of an addition as something other than a Point. (Off of the top of my head I can't think of any use cases, but I'm happy with the capability personally).