New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
problem using Duration #5071
Comments
From @MARTIMMl.s. In REPL;
Conclusion is that += and -= works but *= and /= do not while $d * 2 Greetings This is Rakudo version 2015.12-201-g2a8ca94 built on MoarVM version |
From @smlsThis is the root of the problem: ➜ say ($d + 2).WHAT; The behavior of += and *= is just a consequence of that. |
The RT System itself - Status changed from 'new' to 'open' |
From @MARTIMMOn 01/22/2016 01:52 PM, Sam S. via RT wrote:
|
From @zoffixznet
It's merely a matter that such things require addition of three extra operators per operation (e.g. Duration * Duration, Duration * Num, Num * Duration). Custom operators were added for common operations, such as addition, but rarer ones were omitted. For example, you can subtract two Instants, There's *, /, div, and mod just for basic math. If we count Duration and Instant only that's 24 extra operators to write, debug, maintain, and most importantly compile and load on program start. Since in rarer use cases for which there isn't currently an operator the programmer can simply coerce the value to anything they want, it makes sense to not create custom operators for every imaginable case. For those reasons, I'm rejecting this ticket. -- |
@zoffixznet - Status changed from 'open' to 'rejected' |
From @MARTIMMOn 08/06/2016 05:39 AM, Zoffix Znet via RT wrote:
Hi Zoffix, I understand completely, thanks for looking into it. Marcel |
Migrated from rt.perl.org#127339 (status was 'rejected')
Searchable as RT127339$
The text was updated successfully, but these errors were encountered: