Skip to content
This repository was archived by the owner on Jan 25, 2022. It is now read-only.
This repository was archived by the owner on Jan 25, 2022. It is now read-only.

%ThrowTypeError% name (again) #28

Closed
@anba

Description

@anba

Follow-up from #14

#14 (comment)

I think we should just make it an invariant that all well-known intrinsics that are functions be given names.

Currently well-known intrinsics are extended when external specifications like to have an entry for a built-in function (tc39/ecma262#1105). That means when an external spec likes to have a reference to a currently anonymous built-in, the built-in needs to be named before it can be added as a well-known intrinsic. And I'm not sure I like to have this kind of dependency in the spec. It feels a bit obscure. Also when a well-known intrinsic entry is no longer needed, would it be possible to change the function back to be anonymous or do we need to keep the name for compatibility reasons?

This may all change with tc39/ecma262#1049 which ditches the concept of anonymous functions, but until we have a decision for that issue, I'd say @claudepache 's proposal at #14 (comment) seems to be the better choice here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions