Re: [dev-servo] JST guide

2014-03-04 Thread Robert O'Callahan
On Wed, Mar 5, 2014 at 11:33 AM, Josh Matthews j...@joshmatthews.netwrote: I know that some contributors have expressed confusion about the new JST types that are all over the DOM. I've started a guide to try and clear up how to use them; please feel free to suggest further topics or make

Re: [dev-servo] JST guide

2014-03-04 Thread Josh Matthews
On 03/04/2014 06:09 PM, Robert O'Callahan wrote: On Wed, Mar 5, 2014 at 11:33 AM, Josh Matthews j...@joshmatthews.netwrote: I know that some contributors have expressed confusion about the new JST types that are all over the DOM. I've started a guide to try and clear up how to use them; please

Re: [dev-servo] JST guide

2014-03-04 Thread Brendan Eich
Josh Matthews wrote: It can be, but there are cases when that would be wasted effort. Sure, but if there are cases where the one-liner wastes no effort, it wins. I'm open either way. Both, sounds like. /be ___ dev-servo mailing list

Re: [dev-servo] JST guide

2014-03-04 Thread Robert O'Callahan
On Wed, Mar 5, 2014 at 12:55 PM, Josh Matthews j...@joshmatthews.netwrote: It can be, but there are cases when that would be wasted effort. I'm open either way. In XPCOM terms, the vast majority of QueryInterface calls do more with the returned pointer than a null check. So I think you'll

Re: [dev-servo] JST guide

2014-03-04 Thread Boris Zbarsky
On 3/4/14 5:33 PM, Josh Matthews wrote: I know that some contributors have expressed confusion about the new JST types that are all over the DOM. I've started a guide to try and clear up how to use them; please feel free to suggest further topics or make edits yourself:

Re: [dev-servo] JST guide

2014-03-04 Thread Josh Matthews
On 03/04/2014 10:27 PM, Boris Zbarsky wrote: On 3/4/14 5:33 PM, Josh Matthews wrote: I know that some contributors have expressed confusion about the new JST types that are all over the DOM. I've started a guide to try and clear up how to use them; please feel free to suggest further topics or

Re: [dev-servo] JST guide

2014-03-04 Thread Patrick Walton
On 3/4/14 8:32 PM, Josh Matthews wrote: I was actually thinking that we could rewrite methods that look like this: fn TakesANode(node: JSNode) to read as follows: fn TakesANodeN: NodeBase(node: JSN) { let node: JSNode = NodeCast::from(node); That would enable passing any Node-derived type