Quantcast
Channel: Ruby Issue Tracking System: shevegen (Robert A. Heiler)
Viewing all articles
Browse latest Browse all 100

Ruby master - Feature #16894: Integer division for Ruby 3

$
0
0

I am not necessarily against such a change per se, but I think it would come with a
high cost right now. It should perhaps be discussed more for ruby 4.0 or so.

By the way, mruby behaves in a similar way. Matz explained that years ago
in a video. :)

For example, if you do start mirb, and do this right now:

1/2 # => 0.5

So in some ways MRI would sync towards mruby here. ;)

But as said, I think if this were to be changed for MRI, I would recommend
a long transition time, so perhaps a discussion for this at ruby ~3.2 or
so (hard to predict the future!).

PS: I should also add that I have a slight favour in retaining the current
behaviour, but I also don't mind a change. I also agree with sawa in that
// is not really pretty; I actually prefer .to_i and .to_f rather than
//.

Nobu mentioned: a.quo b

I did not even know about that method! :) (Not sure if I would need it,
but it's interesting how you can learn from the bugtracker.)


Viewing all articles
Browse latest Browse all 100

Trending Articles