Benjamin Goldberg <[EMAIL PROTECTED]> wrote: > ... I'd rather have two versions of add, one > with set/create semantics and the other with assign/mutate semantics.
As already outlined, this leads to some kind of duplicating of our opcodes, vtables, penalty on JIT implementators and so on. We (/me) don't need this. Its up to the HLL, how to program a CPU (virtual or not). You generate a sequence of opcodes that do the Right Thing[1] (Fast)[2]. This may imply to use a "assign", "clone", "set" or whatever opcode and an "add" opcode, depending on the semantics or whatever the language might need (references or values or ...)[3] [1] there must be a minimal set of opcodes, that doesn't prohibit the programmar ... If Something is really missing, we'll add some wires to the (VM) hardware. [2] If a sequence of ops is heavily used and some shortcut (micro op) comes out to be a lot faster, we'll rewire the engine and implement it in core. [3] most of that stuff can be handled by the vtable implementing e.g. the C<add> method. It can do everything with a (yes - existing) destination PMC. just my 2c leo