this post was submitted on 12 Mar 2022
3 points (100.0% liked)
Rust Programming
8346 readers
15 users here now
founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Hmm, yeah, this is good. Coming from more object-oriented programming languages, my first intuition was to throw down a trait with those shared methods/fields, which then both coordinate-types implement, but that's rather clunky in Rust, since traits cannot define fields...