On 5/26/14 3:11 PM, Simon Sapin wrote:
I’m fine with that, but I’m more interested in the signature than the
naming. That is, which of these (or others) to have, for each private
field?
fn(&self) -> T
fn(&mut self, T)
fn(&'a mut self) -> &'a mut T
Hmm. My gut tells me the first and the third. I think we need at least
two, to handle immutable receivers and mutable receivers. I don't see
any pressing need for a `.set()`-style method, as it only takes one
extra character for the caller to use the mut-ref method as a set method
(`*`) and that's fewer characters than `set` would be.
Patrick
_______________________________________________
dev-servo mailing list
dev-servo@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-servo