The same questions are solved for all PMCs - the vtable provides an abstracted interface that everyone can use seamlessly. Because tcl and Java use the same interface (opcodes), there's no problem. I honestly cannot see a difference between these and any other vtable method. The fact that Perl strings work differently than Python strings is cited as one of the reasons why Parrot is so useful for interoperating between languages, and the object system is a logical addition to this.
In fact, these vtable methods *encourage* the use of many languages in a single application. For example, without these methods, programmers have to be aware of the semantics of the Smalltalk object system and use extra code when dealing with Smalltalk objects, breaking abstraction. With them, however, interoperability is complete, and the Smalltalk object semantics are still satisfied. Thanks, Alek Storm On 3/4/07, Joshua Isom <[EMAIL PROTECTED]> wrote:
On Mar 4, 2007, at 12:40 PM, Alek Storm wrote: > For the same reason we have set_attr, set_attr_str, get_attr, and > get_attr_str, even though they're only used by ParrotObject - it > allows for > multiple, concurrent object systems. This goal is mentioned in PDD > 15, in > "What The Bytecode Sees". Why tie programmers into the default way of > doing > things? In Smalltalk, objects and classes work very differently, to > the > point where I have a wrapper object around every class. It would be a > whole > lot easier if I could define my own class implementation. But part of the point of parrot is dynamic language interoperability. Will perl6 and tcl be able to use that new class implementation without a problem, and could you use perl6 and tcl classes and objects? This of course assumes the language gets the added functionality to import stuff across HLL's. There are times where different languages make coding different aspects of a large program easier, so people might want to use, say, perl for the string comparison, tcl for the gui, and java for communicating over the network with a binary protocol. It's just a rough example, but nevertheless, that is the potential of parrot, without using weird embedding stuff.