No, not that hard.

When I find a path node what I need to do is only:
set the value if the node already exists,
create a listener if the node doesn't exist.

When creating a property node(for object) or element node(for array), I
just check if there is a listener to this node.

2012/3/5 Andreas Rossberg <[email protected]>

> On 5 March 2012 13:35, 程劭非 <[email protected]> wrote:
> >  {
> >    a: path(/a2),  // yes,  path(/a2) is a object
> >    a2: {c: 1, d: path(../b/d)},  // no, path(/b) is a path itself you
> will
> > get undefined here.
> >    b: path(/b2), //yes, path(/b2) is a object
> >    b2: {c: path(../a/c), d: 2}, // no path(../a) is a path itself you
> will
> > get undefined here.
> >  }
> >
> > In general, I mean a path will never refer to a object specified by a
> path.
>
> Why? And anyway, what about:
>
>  {
>    a: {c: 1, d: path(../b/d)},
>    b: {c: path(../a/c), d: 2},
>  }
>
> You still need deep dependency analysis.
>
> /Andreas
>
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to