I've been experimenting with the IIFE module pattern ever since I've learned of it. Recently, I've started combining it with classes to seek some further inheritance benefits without manually `extend()`ing. I've come up with a structure that seems to work very well and am curious as to possible negative ramifications. Here is the pseudocode structure below: [var | Namespace.]ClassName = (function(Class) { // Private Static(Class) Members var classPrivate = 'I\'m private!'; // Object Initialization Class.newInstance = function(obj) { obj.property1 = value; obj.property2 = classPrivate; // Call static method Class.method1(); } // Public Static(Class) Methods and Properties Class.member1 = value2; Class.method1 = function(){ console.log('I\'ve been called!'); } // Optional prototype Class.prototype.member = value; return ClassName; }([Namespace.]ClassName = [Namespace.]ClassName || function(){ if (this instanceof ClassName) ClassName.newInstance(this); // Other non-"new" code can go here... })); To make a new object (with a properly constructed class): var objectName = new ClassName(); The clear benefits that I have gained from using this pattern are: - Access to Class public and private members. - Access to Object public and private members - Simpler extension via prototypal chain. - Utilizes standard new() operator for construction/initialization. - (i.e. `var joe = new ClassName();`) - Type comparison for instanceof does not break. - ( `joe instanceof ClassName` ) What I would like to know is: are there leak, security or performance issues with this? Is there a reason (other than convention or personal opinion) that this should not be performed this way? I'm strongly considering implementing this in many of my libraries and would like to know the realistic risks.