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

Avi Bryant avi.bryant at gmail.com
Thu Feb 2 18:36:35 CET 2006

On Feb 2, 2006, at 9:29 AM, David Shaffer wrote:
> 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 :-)

I wouldn't call it industry hardened, but I've posted what we use in  
Dabble to http://squeaksource.com/Money .  It uses the MoneyBag  
approach to dealing with currency that I remember seeing as a pattern  


More information about the Seaside mailing list