Re: [Mathlib-develop] Should NumberToken be immutable?
Status: Beta
Brought to you by:
st_mueller
From: mark <msp...@ya...> - 2003-02-20 13:25:08
|
On Wednesday 12 Feb 2003 1:13 pm, mark wrote: > At the moment when executing num1 <op> num2 the system sometimes modifi= es > num1 and sometimes creates a new NumberToken. > > I've been thinking that it might be better if NumberTokens were immutab= le > so that all operations returned a new object without changing either > operand. > I've made the changes to NumberToken so that all operations should create= a=20 new instance. If an operation ever modifies one of it parameters then that should be=20 considered to be a bug. Best Regards Mark |