archives

« Bugzilla Issues Index

#4080 — 7.4.8 + 7.4.9 + more: "a new built-in function object"


7.4.8 "CreateListIterator ( list )" / step 4
and
7.4.9 "CreateCompoundIterator ( iterator1, iterator2 )" / step 5
both say:
Let next be a new built-in function object as defined in ...

In both cases, "a new built-in function object ..." should probably be changed to an invocation of CreateBuiltinFunction.


Similarly in:
25.4.1.3 / step 2
25.4.1.3 / step 5
25.4.1.5 / step 4
25.4.4.1.1 / step 6.k
26.2.2.1 / step 3


fixed in rev35 editor's draft

The clause 24 and 25 meanings is defined in paragraph 10 of clause 17:

Unless otherwise specified, each built-in function defined in clauses 18 through 26 is created as if by calling the CreateBuiltinFunction abstract operation (9.3.3).

I changed it to:

Unless otherwise specified, each built-in function defined in this specification is created as if by calling the CreateBuiltinFunction abstract operation (9.3.3).

Also added a similar paragraph to 9.3.3


Are you saying that those changes to clauses 17 and 9.3.3 constitute the 'fix',
or they're in addition to explicitly invoking CreateBuiltinFunction at the 7 algorithm steps I noted?


(In reply to Michael Dyck from comment #3)
> Are you saying that those changes to clauses 17 and 9.3.3 constitute the
> 'fix',
> or they're in addition to explicitly invoking CreateBuiltinFunction at the 7
> algorithm steps I noted?

I think the clause 9.3.3 and clause 17 changes are sufficient. Basically all algorithmically specified built-in functions are defined using CreateBuiltinFunction.

The header of 7.4.8.1 and 7.4.9.1 say:

The <interatorkind> next method is a standard built-in function object (clause 17) ...

that is intended to be enough to imply the CreateBuiltinFunction requirement


Please note that my point is *not* "the spec is unclear as to whether CreateBuiltinFunction is involved in the creation of these particular functions",
my point is "when you have a step that creates a built-in function, it would be better to invoke CreateBuiltinFunction explicitly rather than implicitly". (For one thing, doing so would specify the new function's [[Realm]], which I don't think is specified elsewhere.)

Do you think implicit is preferable in such cases?

(And, just be really clear, I'm *not* suggesting that the invocations implied by 8.2.2 step 13 be made explicit.)


fixed in rev35


It would be nice to get a response to comment #5.

While the changes are an improvement, I don't agree they're a fix.


(In reply to Michael Dyck from comment #7)
> It would be nice to get a response to comment #5.
>


I think implicit is fine and good enough for this edition.


So it wouldn't be out of line to suggest it for the next edition?


(In reply to Michael Dyck from comment #9)
> So it wouldn't be out of line to suggest it for the next edition?

Feel free