Skip to content

Latest commit

 

History

History

tc39-2021-07

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
theme paginate style
gaia
true
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.14.0/css/all.min.css'); @import url('https://cdn.jsdelivr.net/npm/hack-font@3/build/web/hack-subset.css'); @import url('https://fonts.googleapis.com/css2?family=Rubik:ital,wght@0,400;0,700;1,400;1,700&display=swap'); code { font-family: Hack; } section { font-family: Rubik, sans-serif; letter-spacing: 0; } section.lead.invert { text-shadow: 0 0 10px black, 0 0 20px black; } pre code { background-color: #042029; } .hljs-string { color: #8ae234; } .hljs-number, .hljs-literal { color: #729fcf; } .hljs-params { color: #e9b96e; font-style: italic; } .hljs-built_in { color: #fce94f; font-weight: bold; } .hljs-keyword { color: #fcaf3e; font-weight: bold; } .hljs-attr { color: #e9b96e; } .hljs-variable { color: red; font-weight: bold; } /* .hljs-comment, .hljs-regexp, .hljs-symbol */

Guidance for nested namespace objects

Philip Chimento Igalia, in partnership with Bloomberg
TC39 July 2021


Top-level namespace objects

  • Should be capitalized (e.g. Math, Temporal)
  • Should have a @@toStringTag (June 2020 plenary)

Nested namespace objects

  • Temporal.now? Temporal.Now?
  • Temporal.now[Symbol.toStringTag] == 'Temporal.now'?

Proposal

  • Provide explicit guidance in how-we-work that both top-level and nested namespaces should
    • be capitalized
    • have a @@toStringTag equal to the fully qualified name

Asking the plenary for (1/2)

  • Consensus on the points on the previous slide?
    • ✅ @@toStringTag equal to the fully qualified name
    • ❓ capitalization
      • Definition of namespace? "I know it when I see it"?
      • "The convention for how they are capitalized or spelled usually is derived from the kind of thing they are, not where they are put." — Shu

Asking the plenary for (2/2)

  • Consensus on making this change in any current proposals?
  • A volunteer to write this up in how-we-work?