Tanaka Akira
Tanaka Akira
Ruby committer, Researcher of National Institute of Advanced Industrial Science and Technology (AIST)

Unifying Fixnum and Bignum into Integer

Ruby has three classes to represent integers: Fixnum, Bignum and Integer.
Integer is the abstract super class of Fixnum and Bignum.
Fixnum represents small integers that fit in a word.
Bignum can represent any integers until the memory is full.
The exact range of Fixnum varies depending on the machine architecture and Ruby implementation.
Since Fixnum and Bignum are implementation details,
applications which depend on the Fixnum range is not portable at least, and just wrong in most cases.
We'll unify Fixnum and Bignum into Integer for Ruby 2.4.
This makes Ruby programs a bit more portable.
Also, hiding the implementation detail makes Ruby easier for beginners to learn.

Presentation Material

Recorded video