masak (>>), coke (>):
> > <masak> r: say Date.new(-13_000_000_000, 1, 1)
> > <p6eval> rakudo cc1858: OUTPUT«-115098112-01-01␤»
> > <masak> o.O
> > <masak> I suppose -115098112 above is a bug?
> > <masak> r: say -13_000_000_000
> > <p6eval> rakudo cc1858: OUTPUT«-13000000000␤»
> > * masak submits rakudobug
> 
> This seems consistent with trying to use a value that is too big for
> an Int (which $.year is); are
> you arguing that this should throw an error, that an Int $.year should
> autopromote to something
> else, or that $.year should be declared as something else?

Either of those three would solve the real issue here, which (IMO) is 
that something different comes out than was put in. Generally, it's not 
nice to destroy user data without at least giving a warning that 
significant digits were lost.

I have no opinion in which of the three methods is preferable, though. 
Maybe this, too, should be a spec issue.

Reply via email to