Open annevk opened 4 years ago
My intuition matches Domenic's - that built-in
is an adjective and builtin
is a noun, but I haven't checked the spec to see if that intuition holds.
but ECMAScript is inconsistent
I see no occurrence of “builtin”, only “built-in”, in ECMA 262 text (where the word is used sometimes as a name (including three “built-ins”), more often as an adjective). The only inconsistency is in variable and operation names such as “CreateBuiltinFunction”, which could be renamed as “CreateBuiltInFunction”.
As another data point, I often have to remind myself that test262 has a built-ins
directory, since JSC has a builtins
directory. 😅
Edit: Looks like V8 also has a builtins
directory, while SM has builtin
(which for present purposes is the same).
The only inconsistency is in variable and operation names such as “CreateBuiltinFunction”
Specifically:
CreateBuiltinFunction
,RegExpBuiltinExec
, and_builtinTag_
in the algorithm for Object.prototype.toString()
.That's all.
(I think the spec's been pretty consistent on this since the first edition.)
My intuition matches Domenic's - that
built-in
is an adjective andbuiltin
is a noun, but I haven't checked the spec to see if that intuition holds.
The spec uses "built-in" as a noun exactly three times, all in the Introduction, and does not ever use "builtin" either way (with the above-mentioned exceptions). All other uses are as adjectives.
Personally my preference would be to avoid using the noun form entirely, which avoids the issue.
Note that even if we change CreateBuiltinFunction
and RegExpBuiltinExec
, _builtinTag_
is not a "built-in tag" (i.e., a tag that's built in), it's the tag for a builtin.
We'd like the web platform to align with ECMAScript, but ECMAScript is inconsistent. I have a mild preference for builtin as English tends to drop hyphens over time and it's nice to be future proof.
A decision here tentatively blocks https://github.com/heycam/webidl/pull/870 so it'd be nice if we could reach a somewhat speedy resolution even if it takes a while for ECMAScript itself to change. (I realize this might be tricky though for what is in essence a bikeshed matter.)
cc @domenic