3 ms·
> Harmony could feature classes as a stronger way of making objects As opposed to what? The current prototypical object model? How can class based OOP be 'stro
by eterps 18y ago
> Harmony could feature classes as a stronger way of making objects
As opposed to what? The current prototypical object model?
How can class based OOP be 'stronger'?
- DougBTX 18y agoHopefully it includes being able to define non-enumerable properties, such as writing your own array.length which won't appear in a foreach statement.
- gruseom 18y agoRead the whole sentence: "a stronger way of making objects and generators to enable powerful programming patterns". Don't you want to enable powerful programming patterns? :)
- richcollins 18y agoIt would be nice if they just fixed the current prototype based system instead.
- cbetz 18y agoWhat is broken about it? (edit: just saw the following comment: Non-enumerable properties would be very nice)
- richcollins 18y agoIt is overly complicated and there are a bunch of special cases. See Io's prototype system as a comparison: http://iolanguage.com/scm/git/checkout/Io/docs/IoGuide.html#Objects-Overview http://iolanguage.com/scm/git/checkout/Io/docs/IoGuide.html#...
- marijn 18y agoThe current object model is theoretically more powerful than class-based objects, but no one has found a way to implement it very efficiently yet. Thus, for performance, it would be nice to have a more static alternative. (Though I suppose they could have come up with a static prototypical system, rather than classes. Classes can be pretty nice though, when they are not Java/C++/C# classes.)
- cbetz 18y agoI read recently that Tracemonkey will have prototype "cache" of sorts that should speed up prototypical inheritance significantly.