From: Chris Cummer Date: 2008-04-05T03:35:17+09:00 Subject: Re: RUBY_IMPLEMENTATION On 4-Apr-08, at 11:04 AM, Alex Young wrote: > By using require(), we open the door to being able to select > implementations in runtimes that are capable of supporting more than > one > implementation of a given feature. defined? can't do that without > metatrickery, Hmm, good point. I'd erroneously looked at your "require 'features/ threading/native'" statement as akin to returning a boolean which is how Luis' implementation suggestion would work. I see now that's not how you'd intended it to be. And if I now understand you correctly your suggestion also seems to satisfy the ability to discern the conditions that Charles brought up yesterday: > JRuby will have native threads, Java libraries, and platform- > independence quirks but no continuations or C extension support. > Rubinius will have green threads, some C extensions, and > continuations. Ruby 1.9 will have native threads with GIL, C > extensions, and so on. All three will have slightly different ways > to access parse trees, instruction sequences, and runtime internals. > All three will hopefully have the same MVM APIs. But it does seem > like we're defining characteristics of a RUNTIME more than an > IMPLEMENTATION or ENGINE, especially since the definition of what is > the "XXX runtime" will probably change while the "XXX engine" > remains essentially the same (or in the case of JRuby, the runtime > stays the same and there's several engines driving it). Correct?