[Seaside] Money ScaledDecimal is it really *appropriate* ?

Ramon Leon rleon at insario.com
Thu Feb 2 19:14:37 CET 2006

> I'd like to second what I believe Colin said about using 
> integers to represent money.  If you need four digits then 
> that dictates the scale of your integers.  Maybe 
> ScaledDecimals would do the job, don't know anything about 
> them, but my experience dictates that it only takes 10 
> minutes to put together a Money (and/or Currency) class based 
> on this integer representation and it is well worth the 
> effort.  Attached is one that I've used in the past...maybe 
> not as robust as you need but you could probably hack it into 
> your 4-digit form faster than you could learn about ScaledDecimal...
> Maybe somewants to post a more industry hardened version :-)
> David

Heh, I wondered how long it'd be before someone said just use a Money
object, this is Smalltalk after all.

More information about the Seaside mailing list