| |
| ▲ | an hour ago | parent | next [-] | | [deleted] | |
| ▲ | nasretdinov 8 hours ago | parent | prev [-] | | Generic interfaces are going to be implemented later too if I'm reading correctly. So no real surprises there :). I guess the only surprise yet is that generic interfaces aren't supported, so generic methods physically can't satisfy any interface | | |
| ▲ | kbolino 3 hours ago | parent | next [-] | | Generic interfaces already exist. Generic interface methods, which would be relevant, are not planned. The reason is outlined early in the proposal: nobody knows how to implement them efficiently. Rust has the same problem, for what it's worth: dispatchable functions on dyn-compatible traits cannot be generic [1]. [1]: https://doc.rust-lang.org/reference/items/traits.html#r-item... | | |
| ▲ | tialaramex an hour ago | parent [-] | | Or to look at that from another angle, if you were to define a Trait which has generic methods that Trait won't be "dyn-compatible" meaning that you can't do dynamic dispatch with this trait, which may be irrelevant to you (if you don't want dynamic dispatch anyway) or a showstopper (if you needed it, now your project won't compile). | | |
| ▲ | dwattttt 39 minutes ago | parent [-] | | That is another way of looking at it, but given the topic, you're gonna have to expand or contextualise that. I Rust a fair bit, and only barely follow. |
|
| |
| ▲ | ncruces 6 hours ago | parent | prev [-] | | I didn't see anything beyond "this doesn't prevent us from doing it" yet. Did you? |
|
|