3 ms·
Does this suggest that "Encodable" isn't the right name for this trait, if it's being used for something that has nothing to do with encoding? Visitable?
by haberman 12y ago
Does this suggest that "Encodable" isn't the right name for this trait, if it's being used for something that has nothing to do with encoding?
Visitable?
- mercurial 12y agoWhat kind of encoding? You have plenty of JSON library which use encode/decode methods, so it's not unheard of in this context. And Visitable would be too generic, this is really about serialization.
- lastontheboat 12y agoIt actually suggests that we're misusing the trait in the short term, since it's one of the few that has built-in deriving magic in the compiler. In the future that won't be the case, but Rust is still a work in progress.
- dbaupp 12y agoIt's still pluggable (as it's just a normal syntax extension), it's only the #[deriving(...)] syntax that is not overloadable. E.g. a custom attribute #[js_traceable] can use all the back-end code of #[deriving], with only the surface syntax different. https://github.com/servo/servo/issues/2774 https://github.com/servo/servo/issues/2774
- asb 12y agoThe plan is to move to a syntax extension: http://www.reddit.com/r/rust/comments/2emzkb/javascript_servos_only_garbage_collector/ck13wwd?context=1 http://www.reddit.com/r/rust/comments/2emzkb/javascript_serv...