-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8846,7 +8846,9 @@ <h1>CreateBuiltinFunction ( _steps_, _internalSlotsList_ [ , _realm_ [ , _protot | |
|
||
<emu-clause id="sec-built-in-exotic-object-internal-methods-and-slots"> | ||
<h1>Built-in Exotic Object Internal Methods and Slots</h1> | ||
<p>This specification defines several kinds of built-in exotic objects. These objects generally behave similar to ordinary objects except for a few specific situations. The following exotic objects use the ordinary object internal methods except where it is explicitly specified otherwise below:</p> | ||
<p>This specification defines several kinds of built-in exotic objects. These objects generally behave similar to ordinary objects except for a few specific situations.</p> | ||
<p>In some algorithms, there are steps of the form "If object is an X exotic object, ...", where X names a kind of exotic object such as Array, Bound Function, or Proxy. Each kind of exotic object is specified to have a particular collection of internal methods. A conformant implementation must provide X exotic objects and must recognize them as such by inspecting the object's internal methods. In other words, an implementation-provided exotic object that is behaviourally equivalent to an X exotic object but does not have the same collection of internal methods specified for X exotic objects is not recognized as an X exotic object.</p> | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
syg
Author
Contributor
|
||
<p>The following exotic objects use the ordinary object internal methods except where it is explicitly specified otherwise below:</p> | ||
|
||
<emu-clause id="sec-bound-function-exotic-objects"> | ||
<h1>Bound Function Exotic Objects</h1> | ||
|
Well, that wording implies that internal methods exist in the implementation (and can be inspected), which is at odds with the idea that internal methods are merely a specification mechanism (defined "purely for expository purposes"). But that doesn't seem to bother anyone else, so I've almost given up.
More concerning though: consider an implementation-provided exotic object that has exactly the same collection of internal methods specified for X exotic objects, but was created in a different way. This wording suggests that that object would be recognized as an X exotic object, but presumably we don't want it to be.
One way to resolve this problem would be if the XCreate operation were somehow part of "the collection of internal methods for X"; however, that wouldn't really make sense with the way things are set up now.
Here's some revised wording that takes from both, is less verbose that either, and avoids the above problems:
(BTW, I dropped the "or Proxy" because it kept sounding to me like a complete list (which of course it isn't), even despite the "such as". With only 2 items, it seems clearer that it's just a couple of examples.)