On Tue Dec 22 07:04:38 2015, alex.jakime...@gmail.com wrote: > Let's start with this: > > Code: > my Int $x = Inf > > Result: > ===SORRY!=== > Cannot find method 'value' > > LTA for sure (meaningless description, no line number). > > According to S02 (https://design.perl6.org/S02.html#Immutable_types) it > should be possible to store Inf and NaN in Int. > > This, however, is not what we have right now. > > In other words, there are three (maybe more?) ways to improve this: > 1) Make it possible to store Inf in Int (therefore the error will go away) > 2) Make it throw NYI warning now, perhaps implement it later > 3) Decide that Inf is not compatible with Int, fix the docs and make it > throw a meaningful warning.
This was addressed in the rejected 61602 - note that the SYN are not necessarily the spec. We need a spec ruling to make this work, and making a performant implementation needs to happen first. > However, there is another issue that is closely related to this. > > Code: > say Int.Range > > Result: > -Inf..Inf > > Whether this answer is correct or not depends on the decision above: > 1) If it is possible to put Inf into Int variable, then it is correct. > 2) If it will be possible later, then… um… I don't know. Perhaps it is a > good idea to correct it now and then revert it later. > 3) Just fix it! It should be -Inf^..^Inf (at least that's what would make > it clear that you cannot use Inf as Int) > > IRC log: http://irclog.perlgeek.de/perl6/2015-12-22#i_11757210 3 seems reasonable. -- Will "Coke" Coleda