On Saturday, March 22, 2014, comex <[email protected]> wrote: > > > To be drastic, if Encodable were > > pub trait Encodable { > fn encode<S: Encoder>(&self, s: &mut S); > } > > wouldn't it avoid this problem?
We can't do that because it would prevent us from writing an Encodable/Decodable type that works with a specific encoder/decoder. That can allow us to do clever things like interning strings or support deserializing generic types like json::Json.
_______________________________________________ Rust-dev mailing list [email protected] https://mail.mozilla.org/listinfo/rust-dev
