fn greet<T: Player>(&self, other: &T);
Yeah, this doesn't work, but the equivalent to what you are writing in Julia does: fn greet(&self, other: Box<dyn Player>); fn greet<T: Player>(&self, other: &T);
Yeah, this doesn't work, but the equivalent to what you are writing in Julia does: fn greet(&self, other: Box<dyn Player>);edit - Alright I think I see what the original article was trying to express. In the original article that top example method was defined as part of a trait. Because that method is generic that would make the trait not object safe. On its own that is fine (this would still compile), but there was some previous example code which relied on this trait being object safe.
fn greet(&self, other: &dyn Player);