Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Normative: Add import.meta[Symbol.toStringTag] #2106

Closed

Conversation

ExE-Boss
Copy link
Contributor

@ExE-Boss ExE-Boss commented Jul 21, 2020

@ExE-Boss ExE-Boss force-pushed the normative/add-import-meta-tostringtag branch from 50150a0 to 8272d88 Compare July 21, 2020 18:57
@ljharb ljharb added needs test262 tests The proposal should specify how to test an implementation. Ideally via github.com/tc39/test262 normative change Affects behavior required to correctly evaluate some ECMAScript source text labels Jul 21, 2020
@ljharb ljharb requested review from syg, michaelficarra, bakkot and a team July 21, 2020 19:04
@ljharb ljharb added the needs consensus This needs committee consensus before it can be eligible to be merged. label Jul 21, 2020
@ljharb
Copy link
Member

ljharb commented Jul 21, 2020

I failed to mention this in this week's meeting, so it will probably have to wait until the next meeting to be discussed.

@bmeck
Copy link
Member

bmeck commented Jul 21, 2020

I'm not convinced we should do this.

  • Hosts can supply toStringTag already
  • Hosts can replace the prototype of import.meta objects (none do ?)
  • Unlike other objects created by the spec this is generated by host data and not something we have looked at adding properties to at TC39. I'd even go so far as to state TC39 should never populate these objects as even things designed to have some host interoperability like import.meta.url are not consistent across platforms for various known reasons.
  • There are many of these objects unlike the other things we add @@toStringTag, it seems odd to add many own properties where other namespace objects only add it to a central location (because they are a centralized location).

@ljharb ljharb force-pushed the master branch 3 times, most recently from 3d0c24c to 7a79833 Compare June 29, 2021 02:21
@ljharb
Copy link
Member

ljharb commented Oct 6, 2021

The fourth point is i think addressed by https://tc39.es/ecma262/#sec-@@tostringtag - Module Namespace objects have multiples and have own Symbol.toStringTag properties, and since they're own properties, the second point isn't relevant.

The third point in particular remains, and is compelling, but I still think it's worth a quick discussion in plenary. I'll add it to the agenda for the meeting after next (timezones are prohibitive for me for the next meeting).

@ljharb
Copy link
Member

ljharb commented Dec 14, 2021

The committee decided not to provide consensus for this at today's plenary.

However, in the future if there are more compelling use cases, or if debuggability (the lack of a tag) turns out to be a bigger issue, the committee is welcome to revisit it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs consensus This needs committee consensus before it can be eligible to be merged. needs test262 tests The proposal should specify how to test an implementation. Ideally via github.com/tc39/test262 normative change Affects behavior required to correctly evaluate some ECMAScript source text
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants