On Fri, Jun 18, 2004 at 06:29:32PM +0900, Michael Neumann wrote: > > They are actually possible with the current language; you'd "only" > > need a code specializer + careful code cache invalidation (take a look > > at the Self papers). > > Hm, but isn't that much harder to implement? And you need all these ======================== Indeed. The Self team needed many man-years and they knew what they were doing. It took Sun quite a long time to create an acceptable VM/JIT for a much less dynamic language like Java, and they had most of the original Self crew working for them :-P > tests at runtime (well, should be no performance penalty). > > For example: > > a = 1 > a += 2 > > This piece of code would become invalid, when the Integer#+ method is > redefined. That's what I referred to with 'code cache invalidation'; on redefinition of Integer#+, all specialized code segments that used the old one would be flushed out. This is performed on method redefinition, which should be quite rare. > Hm, indeed, doesn't look imposible for me. What are the advantages (of > both)? "Both"? If you're referring to selector namespaces, they don't simplify the runtime needs that much, unless you forbid method redefinitions. There could be some small speed increase, since code invalidation would be a bit less frequent (would of course depend on the performance of the code specializer). -- Running Debian GNU/Linux Sid (unstable) batsman dot geo at yahoo dot com Linux: Where Don't We Want To Go Today? -- Submitted by Pancrazio De Mauro, paraphrasing some well-known sales talk