Closed domenic closed 10 years ago
@allenwb, looking at the draft, I am confused about best practice for abstract operations that are not internal methods of objects. It seems clear that for internal methods, you use the "return the result of ..." quoted above. But for general abstract operations, I see any of:
Let replStr be the result of the abstract operation GetReplaceSubstitution(matched, string, pos, captures).
Let rx be the result of the abstract operation RegExpCreate (21.2.3.3) with arguments regexp and undefined.
Let next be the result of IteratorStep(iterator).
Let nextValue be IteratorValue(next).
Obviously I'm a fan of the last one. Which should it be? And any thoughts on the internal methods case?
I have settled on
Let next be the result of calling AbstractOperation(arg1, arg2).
This is largely done except inside operations which I still anticipate other revisions for.
any of these are fine. Depending upon the phase of the moon I might change such things. But probably not.
Fixed by tonight/this morning's commits.
The ES spec, unfortunately, prefers verbose things like
Whereas I have written things as