Object.is steps are very thing

Allen Wirfs-Brock allen at wirfs-brock.com
Sat Mar 16 16:01:19 PDT 2013

On Mar 16, 2013, at 11:18 AM, Tom Schuster wrote:

> Hey!
> 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.


More information about the es-discuss mailing list