From: Eric B. <er...@go...> - 2008-02-07 14:54:41
|
CRISMER Paul-Georges wrote: > In fact, I remember I've been forced to do that for assertion violation reason. > > The initial implementation follows your proposal. > > The problem is I did not log the rationale for doing that. > And for the moment I do not have energy to chase why. > > Best regards, > > Paul G. Crismer > > -----Original Message----- > From: Eric Bezault [mailto:er...@go...] > > Sent: jeudi 7 février 2008 15:40 > To: CRISMER Paul-Georges > Cc: Gobo Developers Mailing List > Subject: Re: [gobo-eiffel-develop] MA_DECIMAL_CONSTANTS.zero > > CRISMER Paul-Georges wrote: >> Recursive? > > Oops, indeed. I didn't realize that we were talking about `zero' from MA_DECIMAL_CONSTANTS and not from MA_DECIMAL. > > This implementation looks twisted to me though. I would have written in class MA_DECIMAL_CONSTANTS: > > zero: MA_DECIMAL is > -- Neutral element for "+" and "-" > once > create Result.make_zero > ensure > zero_not_void: Result /= Void > is_zero: Result.is_zero > end > > and in MA_DECIMAL: > > zero: like Current is > -- Neutral element for "+" and "-" > do > Result := decimal.zero > ensure then > is_zero: Result.is_zero > end > > and no need for `once_zero'. Or did I miss something again? > > -- > Eric Bezault > mailto:er...@go... > http://www.gobosoft.com > > ***** Disclaimer ***** > http://www.groupes.be/1_mail-disclaimer.htm > > > |