Hello Decimal World

js> print(new Decimal("8.5"));
8.5

OK, so it is not much yet.  But it is a constructor, a toString method, and a finalizer.  And it makes use of decQuadFromString and decQuadToString from the decNumber library.  And it is in the context of a real codebase, namely SpiderMonkey, which is what Firefox uses.  And it is in a public repository that you can clone, pull, and download from; and perhaps even try building yourself or patching.


What does this mean:

“And it is in the context of a real codebase,..”

Is rhino not a real codebase? I mean, I know there are only one or two java developers left since the Great Awakening, but I would probably put it in the ‘real’ column.

Posted by Rob Koberg at

SpiderMonkey being a real codebase doesn’t make Rhino any less real.

Per my previous post on the subject, I’m working on spec’ing Decimal support for all compatible implementations of ECMAScript.  However appealing it might be to do so, a spec that states “simply include a JVM, and thereby you will gain access to a BigDecimal class” is not going to enjoy consensus.

Posted by Sam Ruby at

Add your comment












Nav Bar