@jdalton, open your mind and listen carefully, OK?

The snippet you blamed for free, the Internet Explorer Scope Resolution,
works perfectly. For works perfectly I mean that is the one to solve the
problem in Internet Explorer when a function would like to be named in the
same scope.

Your test is superficial, and your blame about my post unfair.

You took a snippet I wrote directly in jQuery ml for a single case, without
caring about that single leak.
Then you felt down your blaming Internet Explorer Scope Resolution article,
providing a test that does not even respect the Internet Explorer Scope
Resolution snippet.

What am I talking about, quite simple. If you understood IE scope
resolution, and again you did not, you realize the code you compared should
be different:

while(iterations--){
    jQuery.ajaxSettings["ext" + iterations] = (function(anonymous){
      // no bullshit sherlok!
      var ext = function ext(o){
        anonymous.prototype = this.data || {};
        var k, result = new anonymous;
        if(o){
          for(k in o)
            result[k] = o[k]
          ;
        };
        return result;
      };
      return ext;
    })(Function());
  };

Moreover, if you did understand my article you would have realized that this
is the correct representation of Internet Explorer Scope Resolution.

while(iterations--){
    jQuery.ajaxSettings["ext" + iterations] = (function(anonymous){
      // compare this in IE
      return ext = function ext(o){
        anonymous.prototype = this.data || {};
        var k, result = new anonymous;
        if(o){
          for(k in o)
            result[k] = o[k]
          ;
        };
        return result;
      };
    })(Function());
  };

Let me summarize:

   1. the problem is the named function for every browser
   2. the leak you spotted is the double reference (anonymous + ext function
   plus the persistent ext in the scope) ... and you need 100000 iterations to
   find a concrete gap ...
   3. the article you blamed does NOT use the snippet I have suggested here
   and that article explain references in IE. You can spend your life
   demonstrating that article is wrong and you'll nicely fail, cause that
   article simply explain how things are in Internet Explorer, it does not
   provide anything else than understanding how things are. So have fun blaming
   something unrelated, such best practices, providing code unable to solve the
   blamed problem ... quite hilarious!
   4. if you will tell me how much significant is a couple of hundreds bytes
   over 100000 functions taking my last snippet, the above one, I can simply
   reply that you are not considering a real case scenario and the reason is a
   bit bigger is the double reference in the scope, the variable ext which aim
   is to overwrite the ext function reference.
   5. In your code there is a single named function so a single reference.
   Well, that would have been OK for my snippet, and for god sake if you gonna
   spend days every time I write a quick suggestion I'll simply stop to write
   them (and you won't write any other suggestion since without me your fun is
   over)

If the problem is the named function, my Internet Explorer Scope Resolution
gives some answers, you don't need to blame for free.

If the problem is a suggested snippet for a single case, quickly, and
without considering 100000 iterations, I agree your version with a single
named function is better than mine but still, my article is totally
unrelated.

As summary, then I am out of this total Off Topic list of comments, you need
to use the web in a better way.
If you would have commented with that pointless "prove" in the right place,
my Internet Explorer Scope Resolution article, you would have better
understand that article and have more time to find the best solution for
everyone, rather than waste time to find the wrong prove my article is wrong
...

If you arrive here blaming an unrelated article, comparing two functions
obviously and totally different, for the ice-cream trophy of the best troll
ever, well ... it's like me posting a jQuery patch in PHP.net blaming John
for something he never did ... does it make any sense?

If your intent is to inform, do it in the right places, which is not this ML
for an unrelated snippet, neither twitter used as a chat like the ridiculous
"blame for free with the wrong reply again" stuff for the sourceIndex ...
look, when you remove nodes they have sourceIndex 0 ... yeah, as they have
-1 in Opera, expected behavior, sourceIndex does not need normalization.

Wanna write your thoughts in the right place as a permanent comment,
discussion point, or  you are so proud of yourself that you store your same
tweets so one day you may be able to say to the world: look, I have tweeted
it?

Sorry jQuery ml for this long and tedious Off Topic, at least I hope
somebody understood how things work in Explorer.

Next time I'll write a quick suggestion to solve a problem I promise I'll
spend 2 days to prove that was not the best way ever to do it ( so goodbye
quick snippets/suggestions in a ml which aim would be to provide some help )

Regards

On Mon, Oct 26, 2009 at 9:16 AM, Andrea Giammarchi <
andrea.giammar...@gmail.com> wrote:

>
>
> On Mon, Oct 26, 2009 at 8:31 AM, Andrea Giammarchi <
> andrea.giammar...@gmail.com> wrote:
>
>> Please don't embaras yourself. My snippet is exactly the same proposed by
>> Juryi. If you understand IE scope resolution, and apparently you don't, you
>> realize the name of the assigned variable does not count at all and var
>> F=null is like the assignment. Moreover, this is jQuery mailing list and you
>> arrived talking about safari 2 which is not in the supported browser list.
>> Finally, I can post a picture jdalton VS no-jdalton ... so what? Where is
>> the code? Who said you did use the proper way? Who said it won't be the same
>> with your pattern? Don't be a fool, you are usually a good developer.
>> Regards
>>
>
> OK, autogoal, between the shower and the ironing I did not check the
> source, just checked the code.
> Now I am in the office and I gonna perform a couple of tests then I'll be
> back, if anybody is interested.
>
> Regards
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jQuery Development" group.
To post to this group, send email to jquery-dev@googlegroups.com
To unsubscribe from this group, send email to 
jquery-dev+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/jquery-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to