Re: Property vs Behavior inheritance

2011-12-16 Thread Axel Rauschmayer
With object exemplars, you have: var jane = new Person(Jane); var Employee = Person | { ... }; (Since I guess only long time readers of this newsgroup could understand what you write above, let me give a capsule summary: Employee becomes an object with a .prototype property

Re: Property vs Behavior inheritance

2011-12-16 Thread David Bruant
Le 15/12/2011 23:38, John J Barton a écrit : On Thu, Dec 15, 2011 at 10:58 AM, David Bruant bruan...@gmail.com mailto:bruan...@gmail.com wrote: Classless solutions need a compelling solution to this issue, that is, an operation on a list of vanilla objects that yields a

Re: Property vs Behavior inheritance

2011-12-16 Thread John J Barton
On Fri, Dec 16, 2011 at 4:22 AM, Axel Rauschmayer a...@rauschma.de wrote: ... How you work with object exemplars is almost like with classes: You have to be aware which objects are exemplars and which ones are instances. A useful sanity check could be to require an exemplar to have a

Re: Property vs Behavior inheritance

2011-12-16 Thread Axel Rauschmayer
I'll just re-state this paragraph to illustrate that the glass is half empty: Unlike classes, object exemplars are just objects. There is no language support for detecting a object exemplar; developers have no help in avoiding pernicious debilitating bugs caused by data values in base

Re: Property vs Behavior inheritance

2011-12-16 Thread John J Barton
On Fri, Dec 16, 2011 at 7:42 AM, Axel Rauschmayer a...@rauschma.de wrote: I'll just re-state this paragraph to illustrate that the glass is half empty: Unlike classes, object exemplars are just objects. There is no language support for detecting a object exemplar; developers have no help in

Re: Property vs Behavior inheritance

2011-12-16 Thread Axel Rauschmayer
Sorry I don't understand the question, or how it is related to my quest. I would argue that your quest can be fulfilled by class declarations that desugar to object exemplars. Do you agree? -- Dr. Axel Rauschmayer a...@rauschma.de home: rauschma.de twitter: twitter.com/rauschma blog:

Re: Property vs Behavior inheritance

2011-12-16 Thread John J Barton
On Fri, Dec 16, 2011 at 9:01 AM, Axel Rauschmayer a...@rauschma.de wrote: Sorry I don't understand the question, or how it is related to my quest. I would argue that your quest can be fulfilled by class declarations that desugar to object exemplars. Do you agree? Assuming that your class

Re: Property vs Behavior inheritance

2011-12-16 Thread Axel Rauschmayer
I would argue that your quest can be fulfilled by class declarations that desugar to object exemplars. Do you agree? Assuming that your class declarations resemble say Java's, then of course. But if we have class declarations like Java's why do we care about object exemplars? Because a