On 7/25/13 8:30 AM, Boris Zbarsky wrote:
On 7/24/13 12:16 PM, Josh Matthews wrote:
All DOM objects are represented with |JSManaged<Whatever> whatever|.
When you want to access a property owner_document of Whatever, you use
|do whatever.with_imm |whatever| { whatever.owner_document }|, and |do
whatever.with_mut |whatever| { whatever.owner_document = other_document
}| to modify it.

Hmm.  That looks pretty annoying to write for every single property
access, or am I just misunderstanding?

It is somewhat annoying (and leads to slow compile times too).

Much of the goal of custom smart pointer work in Rust that's going on is to eliminate this boilerplate, so I would expect this to improve in time.

Patrick

_______________________________________________
dev-servo mailing list
dev-servo@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-servo

Reply via email to