« Bugzilla Issues Index
#489 — Inconsistent language across Standard Built-in ECMAScript Object APIs
- bug_id:
489
- creation_ts:
2012-07-09 13:43:00 -0700
- short_desc:
Inconsistent language across Standard Built-in ECMAScript Object APIs
- delta_ts:
2015-02-19 11:41:13 -0800
- product:
Draft for 6th Edition
- component:
editorial issue
- version:
Rev 9: July 8, 2012 Draft
- rep_platform:
All
- op_sys:
All
- bug_status:
RESOLVED
- resolution:
FIXED
- priority:
Normal
- bug_severity:
minor
- everconfirmed:
true
- reporter:
Rick Waldron
- assigned_to:
Allen Wirfs-Brock
- cc:
waldron.rick
- commentid:
1229
- comment_count:
0
- who:
Rick Waldron
- bug_when:
2012-07-09 13:43:39 -0700
Some API instructions read as follows:
"Let O be the result of calling ToObject passing the this value as the argument. "
Whereas others read as
"Let cooked be ToObject(callSite)."
"Let raw be ToObject(rawValue)."
As seen in String.raw
I'll continue to look for other occurrences of the language
- commentid:
1230
- comment_count:
1
- who:
Rick Waldron
- bug_when:
2012-07-09 13:44:26 -0700
"Let S be the result of calling ToString, giving it the this value as its argument. "
- commentid:
1234
- comment_count:
2
- who:
Allen Wirfs-Brock
- bug_when:
2012-07-09 14:20:13 -0700
Yes, going back to ES5, the parenthesized form is generally used when the argument is a "variable" and the sentence form is used when the argument needs to be described with a phrase, such as "the this value".
I'm not sure that ToObject(the this value) would be preferable to to "passing the this value..."
- commentid:
1238
- comment_count:
3
- who:
Rick Waldron
- bug_when:
2012-07-09 14:25:07 -0700
I'm not sure it would be either - what about the other way?
"Let cooked be the result of calling ToObject, passing callSite as the argument"
- commentid:
12974
- comment_count:
4
- who:
Allen Wirfs-Brock
- bug_when:
2015-02-19 11:10:45 -0800
pretty sure these have now all been converted to the (this Object) form
- commentid:
12975
- comment_count:
5
- who:
Rick Waldron
- bug_when:
2015-02-19 11:41:13 -0800
Yes, I have not seen the other form in a very long time