From: Eleanor McHugh Date: 2008-04-04T19:05:33+09:00 Subject: Re: RUBY_IMPLEMENTATION On 4 Apr 2008, at 00:23, Charles Oliver Nutter wrote: > Yemi I. D. Bedu wrote: >> Hello, >> What do you feel about RUNTIME. IN both your examples it would be >> "JRuby". A variable of PLATFORM would handle the Windows/OpenVMS >> information. It would not matter to the code what compiler was used >> but >> if so, then VM could be used to specify the machine code compile type >> "Rubinius/YARV/JIT)/(Interpreted)". Then IMPLEMENTATION could >> equate to >> PLATORM + RUNTIME + VM. Would that be sensible? Maybe the ordering is >> not should be changed. Good day. > > RUNTIME does seem more in line with "a set of features I can expect > to be available." 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). > > So I think I like RUNTIME. Well RUNTIME makes more sense to me than ENGINE, but it still suggests that code should be written to suit a particular runtime when what coders really want to know is what FEATURES are available on the platform. I therefore favour a constant RUBY_FEATURES which is a set containing all of the specific features available. This is the approach used in ICON and UNICON and works well. It's also better for future proofing as new items can be added to the set as the language, libraries and implementations evolve. Ellie Eleanor McHugh Games With Brains http://slides.games-with-brains.net ---- raise ArgumentError unless @reality.responds_to? :reason