I think what I want is specialization in Rust. But I'm not sure if that's actually what I want. E.g. I want to be able to define some method. But then if certain conditions apply define a different, more efficient method with the same signature. That's... specialization right?
(I hope I'm doing an okay job explaining this -- just learned a bunch about this haha)
-
-
Ah so it’s having it choose the most narrow definition that matches?
-
Yeah, that's the idea! Which would allow us to do fun things like "if we read from a socket, and write to a socket, use a super efficient system call to handle it". But still keep the generic implementation for other types. This is all quite experimental still.
- 6 more replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.