this post was submitted on 08 Feb 2024
104 points (100.0% liked)

Rust

6031 readers
2 users here now

Welcome to the Rust community! This is a place to discuss about the Rust programming language.

Wormhole

[email protected]

Credits

  • The icon is a modified version of the official rust logo (changing the colors to a gradient and black background)

founded 1 year ago
MODERATORS
104
Announcing Rust 1.76.0 (blog.rust-lang.org)
submitted 9 months ago by snaggen to c/rust
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 2 points 9 months ago

Yeah, I thought of runtime duck typing when I saw it, which is essentially what an ECS is.

It would be pretty cool to go the next step and be able to find and call methods or discover trait implementations on the type that may not be in the signature. So something like how Go can conditionally type asset an interface to a different interface. I don't know if that's possible in a zero cost way (probably not), but it would be interesting.