Es-discuss - several decimal discussions

Brendan Eich brendan at mozilla.org
Sat Aug 23 19:48:08 PDT 2008


On Aug 23, 2008, at 10:47 AM, Sam Ruby wrote:

> On Sat, Aug 23, 2008 at 1:12 PM, Mike Shaver  
> <mike.shaver at gmail.com> wrote:
>> On Sat, Aug 23, 2008 at 10:04 AM, Sam Ruby  
>> <rubys at intertwingly.net> wrote:
>>> Decimal implemented as a library would be sufficient for a 3.1
>>> release.
>>
>> Would it not be sufficient forever?  It seems like that's the  
>> strategy
>> that Java, Python and C are taking, as far as the Really Important
>> Languages go.  I'd be more comfortable getting experience based on an
>> available library implementation before standardizing it, let alone
>> standardizing a new native numeric type, but I'm not likely to move
>> the committee needle.
>
> I don't believe we know the answer to that question.  In any case, we
> need to decide what the following will produce:
>
>   Decimal.parse('2') + 3
>
> Furthermore, it seems inevitable to me that this topic will come up at
> the next TC 39 meeting in Redmond.  A minimal proposal, much along the
> lines as the one you described above, was available for review in time
> for the Oslo meeting, and resulted in a number of usability concerns
> being expressed such as the one I described above.

Especially since there was no effort (correct me if I'm wrong) to  
throw from ToPrimitive on the Decimal type. Either Decimal (an object  
type) converts to number, which loses precision and expressiveness,  
or it converts to string, which means + is forever after string  
concatenation given Decimal operands. That seems future-hostile, some  
of us said at the Oslo TC39 meeting.

IOW if 3.1 were only to have a new Decimal standard library object  
type (like Date), it would have to be unusable except by method  
calls. It couldn't convert implicitly, even to string. IIRC I called  
that "unusably crufty" in Oslo; I hope I was quoted accurately :-P.


> Given this, the way I would like to proceed is towards a full and
> complete proposal to be ready in time for people to review for the
> Redmond meeting.  It may very well need to be scaled back, but I would
> much rather be in a position where the edit requests that came out of
> that meeting were in the form of "prune this" rather than once again
> be presented with "investigate that and report back".

How would a response of "take the time you need, and we'll track it  
for Harmony; 3.1 is otherwise all but done" strike you?

/be



More information about the Es-discuss mailing list