Super, I like the word "shared". I'll keep an eye not to have any
state in the private block :-)



On Mon, Nov 17, 2008 at 4:23 PM, kangax <[EMAIL PROTECTED]> wrote:
> On Nov 17, 4:13 am, "Mona Remlawi" <[EMAIL PROTECTED]> wrote:
> [...]
>> I'm wondering if this is a good practice. Are there any insights that
>> i should be aware of? Are the private methods/functions being
>> duplicated for each of myclass instance?
> If what you need is to create private static ("class") members, then
> yes, this is one of the most straight-forward ways to do so. Private
> functions are not being duplicated; they are declared only once. When
> an instance is created, public instance methods are still "shared" via
> prototype chain, but also have an access to private functions (as they
> were declared in the same scope).
>> Thanks in advance
>> --
>> mona
> --
> kangax
> >

You received this message because you are subscribed to the Google Groups 
"Prototype &" group.
To post to this group, send email to
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at

Reply via email to