Looking at Moo's source and following the syntax and code style rules
I was (in the past) used to do it like:

var myClass = new Class({
});

then people started to wrap it and adopted:

(function(){

    var myClass = new Class({
    });

})();

or an alternate ending for the wrap (like in cpojer's powertools):

}).call(this);

ryan florence is dropping trailing semi-colons in his (non mootools
released) js code (which is fine I think, others can disagree) but
starting code with a semi-colon before every parenthese like:

;(function(){
})();

and I also noticed this:

var myClass = this.myClass = new Class({
});

since when are we also adding this.myClass? What is the benefit, why
is it important?

Ok, what I'm trying to say is that I see sort of the use of all of
this and I understand what it does, but I don't fully 'get' the path
to follow or why I would do it one way or the other.

Maybe someone can enlighten us here on the list or maybe a blog post
to take away some confusion.

Reply via email to