on semantics, specification, metacircularity, \JS, etc.

Brendan Eich brendan at mozilla.com
Fri May 21 12:32:00 PDT 2010

On May 21, 2010, at 11:44 AM, Allen Wirfs-Brock wrote:

>> -----Original Message-----
>> From: es-discuss-bounces at mozilla.org [mailto:es-discuss-
>> bounces at mozilla.org] On Behalf Of Mike Samuel
> ...
>> David Herman argued that overspecification is a problem in some  
>> parts of the
>> spec and cited Array.prototype.sort.
>> In building your semantics, were there parts of the spec that stood  
>> out as under-
>> specified that could benefit from being described via \JS or desugar?
> Did you really mean "overspecification" in the first sentence?   
> Array.prototype.sort is actually one of the most loosely specified  
> built-in methods.  For example, it doesn't say anything about  
> requiring a specific sort algorithm and leaves many possible cases  
> as "implementation-defined".  Whether or not this is an appropriate  
> level of specification for this function is a separate discussion.

You two are in agreement. Dave's point was that sorting must be  
underspecified. The spec does not want to dictate a sort algorithm or  
even asymptotic complexity. Mike was citing that point as a potential  
issue with any more thorough or systematic semantic specification.  
Graydon noted it in connection with self-hosting.


More information about the es-discuss mailing list