You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As of PR #2271 (specifically 7a5f760), InstantiateFunctionObject delegates to four InstantiateFooFunctionObject operations, depending on the syntax of the function decl:
InstantiateOrdinaryFunctionObject
InstantiateGeneratorFunctionObject
InstantiateAsyncGeneratorFunctionObject
InstantiateAsyncFunctionObject
However, using "Ordinary" in this context is misleading. Yes, the functions created by InstantiateOrdinaryFunctionObject are ordinary, but so are the functions created by all the other InstantiateFooFunctionObject ops. (Note that they all call OrdinaryFunctionCreate, whose name uses the word correctly.)
Ditto all the above for InstantiateOrdinaryFunctionExpression (03d44e0).
The spec doesn't explicitly define an adjective for a function that isn't async or generator (or async-generator), but CreateDynamicFunction uses _kind_ = ~normal~ for this. Which suggests renaming the ops in question to:
InstantiateNormalFunctionObject
InstantiateNormalFunctionExpression
Mind you, the word "normal" is also used in the context of Completion Records. It has a completely different meaning there, so I don't think there's too much chance of confusion, but it might be better to pick a distinct adjective, e.g. "plain".
The text was updated successfully, but these errors were encountered:
As of PR #2271 (specifically 7a5f760), InstantiateFunctionObject delegates to four InstantiateFooFunctionObject operations, depending on the syntax of the function decl:
However, using "Ordinary" in this context is misleading. Yes, the functions created by InstantiateOrdinaryFunctionObject are ordinary, but so are the functions created by all the other InstantiateFooFunctionObject ops. (Note that they all call OrdinaryFunctionCreate, whose name uses the word correctly.)
Ditto all the above for InstantiateOrdinaryFunctionExpression (03d44e0).
The spec doesn't explicitly define an adjective for a function that isn't async or generator (or async-generator), but CreateDynamicFunction uses
_kind_ = ~normal~
for this. Which suggests renaming the ops in question to:Mind you, the word "normal" is also used in the context of Completion Records. It has a completely different meaning there, so I don't think there's too much chance of confusion, but it might be better to pick a distinct adjective, e.g. "plain".
The text was updated successfully, but these errors were encountered: