Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^2: Something that bugs me about the Numeric class hierarchy in Perl 6

by grondilu (Friar)
on Nov 27, 2015 at 10:36 UTC ( #1148710=note: print w/replies, xml ) Need Help??


in reply to Re: Something that bugs me about the Numeric class hierarchy in Perl 6
in thread Something that bugs me about the Numeric class hierarchy in Perl 6

The intermediate results are indeed rats. And yes the result is a rat that looks like an integer. My point was that I wish there was no difference between a "rat that looks like an integer" and an actual integer. In other words, I wish integers were a special case of rats, because in math that's what they are, maybe not by definition, but at least by property : the set Z in included in the set Q. Thus my suggestion of using perl6's subset concept.

  • Comment on Re^2: Something that bugs me about the Numeric class hierarchy in Perl 6

Replies are listed 'Best First'.
Re^3: Something that bugs me about the Numeric class hierarchy in Perl 6
by Ovid (Cardinal) on Jan 08, 2016 at 10:10 UTC

    I just noticed this discussion and it's a difference of opinion I've also had with the core P6 devs: integers and rats are the same. That being said, integer math should be much faster than rational math and I don't know how difficult it would be to special case the code for that.

    On the flip side, by restricting this behavior now, they wouldn't need to take it away later if it proved problematic. I expect that heavier usage of the language over time is what will impact decision making here.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1148710]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (6)
As of 2018-07-18 04:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?















    Results (383 votes). Check out past polls.

    Notices?