Object.is steps are very thing

Axel Rauschmayer axel at rauschma.de
Sat Mar 16 16:49:35 PDT 2013

Has using more powerful function/method signatures ever been a consideration for the spec? For example, type annotations could replace imperative coercions.

On Mar 17, 2013, at 0:01 , Allen Wirfs-Brock <allen at wirfs-brock.com> wrote:

> On Mar 16, 2013, at 11:18 AM, Tom Schuster wrote:
>> Looking at the the steps for Object.is the first sentence just says:
>>> "When the is function is called with arguments value1 and value2 the following steps are taken:"
>> I don't remember other functions being defined like that. It should at
>> least say something along the lines of
>> "When called with less than 2 parameters return false."
> Most built-in functions are described in this manner.  In fact, the preamble text for  for Object.is was copied/pasted/edited from a previously existing Object constructor methods.
> In general, we prefer to exclusively describe the  semantics of built-ins using the algorithmic steps and to avoid redundancy between the preambles and the algorithms.  When I notice it,  generally remove such redundancy that is left over from earlier editions. 
> Paragraph 4 of the introduction to chapter 15 says that any parameters for which arguments are not provided have the value undefined.  So we don't need to say anything about what happens if fewer or more than 2 arguments are passed.

Dr. Axel Rauschmayer
axel at rauschma.de

home: rauschma.de
twitter: twitter.com/rauschma
blog: 2ality.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20130317/475f43cd/attachment-0001.html>

More information about the es-discuss mailing list