Draft of Function.prototype.bind.
Allen.Wirfs-Brock at microsoft.com
Fri Nov 7 08:28:59 PST 2008
Agreed, I believe that the current intent (Sam??) is for decimal to be implemented as a complete parallel to Number with a distinct primitive value type, an wrapper constructor that creates objects with a distinct [[Class]] value, appropriate conversion functions, etc. However, this still this doesn't appear to be fully realized in the current draft.
In addition to the problems areas Brendan pointed out, all the operators defined in section 11 continue to show confusion between primitive decimal values and decimal wrapper objects and decimal is not integrated into the ToPrimitive/[[DefaultValue]]/hint mechanisms of the specification.
> -----Original Message-----
> From: Brendan Eich [mailto:brendan at mozilla.com]
> Sent: Friday, November 07, 2008 1:06 AM
> To: Allen Wirfs-Brock
> Cc: David-Sarah Hopwood; es3.x-discuss at mozilla.org; es-
> discuss at mozilla.org
> Subject: Re: Draft of Function.prototype.bind.
> On Nov 6, 2008, at 9:58 PM, Allen Wirfs-Brock wrote:
> >> -----Original Message-----
> >> From: es3.x-discuss-bounces at mozilla.org [mailto:es3.x-discuss-
> >> bounces at mozilla.org] On Behalf Of Brendan Eich
> >> Sent: Thursday, November 06, 2008 8:05 PM
> > ...
> >> TC39 has generally avoided adding new globals; JSON is "it" for
> >> (AFAIK), and since Murphy was an optimist, it is breaking some
> >> content.
> > Actually, Decimal would be another...
> Good point. But Decimal is not listed in "15.1.4 Constructor
> Properties of the Global Object".
> I just searched for Decimal and ToDecimal in the latest 3. 1 draft,
> and it does not hang together. Nowhere in chapter 9 is the Decimal
> type defined or broken out, but 4.3.3 says that Decimal is a type,
> while 4.3.4 says "A Decimal object is a member of the type Object and
> is an instance of the built-in Number object." 15.13 contradicts this.
> The use of "decimal representation" in 15.7 to mean arbitrary
> precision decimal is confusing.
More information about the Es-discuss