From: eregontp@...
Date: 2019-04-03T12:18:58+00:00
Subject: [ruby-core:92133] [Ruby trunk Bug#15743] RubyVM should be renamed	to CRuby

Issue #15743 has been updated by Eregon (Benoit Daloze).


About the naming discussion, I picked CRuby because I think this is what @matz uses when referring to this implementation.
@matz Could you confirm?

MRI is the more well-known name, but it also has other meanings, and some consider it to be the "ruby 1.8 interpreter" and YARV "ruby 1.9+ VM".

I think CRuby is simply more general than MRI and YARV, e.g., it's not clear if MJIT is part of MRI or YARV, but it's certainly part of CRuby.
YARV is notably used as a name for the bytecode, which is an implementation detail of CRuby.
If the bytecode format changes significantly (e.g., imagine something like RTL),
then it's still `CRuby::AbstractSyntaxTree` and `CRuby::InstructionSequence` but `YARV::InstructionSequence` would be confusing.
I also don't think it's needed to rename this module if the bytecode format changes.

----------------------------------------
Bug #15743: RubyVM should be renamed to CRuby
https://bugs.ruby-lang.org/issues/15743#change-77459

* Author: Eregon (Benoit Daloze)
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: Next Major
* ruby -v: ruby 2.6.2p47 (2019-03-13 revision 67232) [x86_64-linux]
* Backport: 2.4: UNKNOWN, 2.5: UNKNOWN, 2.6: UNKNOWN
----------------------------------------
My understanding is that `RubyVM` is supposed to only exist on MRI/CRuby, and not on any other Ruby implementation.
In fact, almost all features under `RubyVM` are not realistically implementable on other major Ruby implementations (JRuby, TruffleRuby, Rubinius).

Unfortunately, the name doesn't reflect that it is specific to CRuby, e.g., JRuby/TruffleRuby/Rubinius are also "Ruby VMs".
And as a result it is not clear for many Ruby users that RubyVM is CRuby-specific.

The documentation is also unclear:
```
The RubyVM module provides some access to Ruby internals. This module is
for very limited purposes, such as debugging, prototyping, and research.
 Normal users must not use it.
```

So I propose to rename RubyVM to CRuby.
That way, it is clear for everyone that this module is CRuby-specific.
It's also consistent with the JRuby module, the TruffleRuby module and the Rubinius module.

Proposed migration path:

* Introduce CRuby as an alias of RubyVM on `trunk`, and deprecate the RubyVM constant on `trunk` (for 2.7).
* Remove `RubyVM` in Ruby 3.0.

What do you think?

cc @ko1 @k0kubun @headius



-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>