On Mon, 06 Mar 2017 05:48:07 -0800, c...@zoffix.com wrote: > Another issue the .REDUCE-ME thing causes: > > mscha │ m: say (1/2+1/2, 2/2).unique; > +camelia │ rakudo-moar 9da50e: OUTPUT: «(1 1)» > > infix:<+> does not call .REDUCE-ME so the rats are different in this case
I could see where a mutable Rational could be useful. Should we parameterize that role in-core to provide immutable (for Rat and FatRat) and mutable versions for module authors? Or should we kick all mutable functionality out into module space and have module authors provide their own role variant... maybe just adding a single method to Rat/FatRat to allow introspection that they are immutable? Naturally any mutable Rational would come with the caveat that it is not threadsafe. Also, what behavior are we looking for Rat -- just "immutabilty" or "value-type"?