On Wed, Oct 5, 2011 at 7:49 AM, Russell Leggett
<[email protected]>wrote:

> On Wed, Oct 5, 2011 at 10:32 AM, John J Barton
> <[email protected]> wrote:
> >
> >
> > On Tue, Oct 4, 2011 at 10:26 AM, Mike Samuel <[email protected]>
> wrote:
> >>
> >> 2011/10/4 Russell Leggett <[email protected]>:
> >> > On Tue, Oct 4, 2011 at 12:51 PM, Mike Samuel <[email protected]>
> >> > wrote:
> >> >
> >> >> No it doesn't.
> >> >>
> >> >> Just walk the object graph starting from the root object and let the
> >> >> set of all reachable symbols be A.
> >> >> Load jQuery
> >> >> Walk the object graph again letting the set of all reachable symbols
> be
> >> >> B.
> >> >>
> >> >> The public API of jQuery is then (B - A).
> >> >
> >> > That's works fine under 2 conditions:
> >> >
> >> > 1. You're willing to execute code instead of statically analyze it
> >> > 2. You're capable of executing that code in isolation.
> >>
> >> This should be true for most libraries out there.
> >> It obviously doesn't hold for user code and definitely not for all
> >> code in an IDE since IDE's have to deal with code during editing.
> >
> > I'm not a jQuery person, but as far as I can tell jQuery introduces only
> one
> > global value so the jQuery API is just the properties of that object at
> the
> > point in the program where the developer needs to use jQuery.  You don't
> > have to execute code and the only graph you need to walk is the
> properties
> > of one object.
>
> If you looked at the code for more than 5 minutes, you'd see that the
> jQuery codebase, while interesting to look at, would be ridiculously
> hard to statically analyze without understanding jQuery conventions.
> The bulk of the methods are added through calls to 'jQuery.extend(...'
> and 'jQuery.fn.extend(...'
>
>
Sure, that's the way lots of JS code works, which is why I think IDEs based
on static analysis are doomed.

jjb


> >
> > jjb
> >
>
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to