On Wed, 29 Dec 2010 08:25:33 +0100, Emeka <[email protected]> wrote:

Is Prototype JavaScript's way of solving Expression Problem? And what is
really the difference between __proto__ and Prototype?

That depends on what you mean by "Prototype".
The internal [[Prototype]] link of objects is a way to inherit (and thereby share) properties of other objects. It can be used to add new functionality to an unknown number of existing objects, by assigning the functionality to their shared prototype, and that way it can be used to solve the Expression Problem. It just requires that
the Expressions all inherit from a shared prototype object.

The non-standard __proto__ property is some Javascript engines' way of reflecting the internal [[Prototype]] property, making it accessible for both reading and writing.
It's not-standard and not supported by all engines.

/L

--
To view archived discussions from the original JSMentors Mailman list: 
http://www.mail-archive.com/[email protected]/

To search via a non-Google archive, visit here: 
http://www.mail-archive.com/[email protected]/

To unsubscribe from this group, send email to
[email protected]

Reply via email to