Constraints in js

domino game pieces

assorted things about JS. Some notes I took a long time ago.

Parsing considerations

  • Syntax constraints
  • Parsing costs (backtracking, multiple parsing trees before getting tokens, e.g. pipeline
  • ASI hazards, semicolons hazards
  • Tokenization is greedy
  • order independent
  • Punctuation overload

On growing a language

  • Does it belong to the language? The extensible web manifesto.
  • Complexity Budget

  • The cost of growing a language, the role of polyfils

  • Does it stand on its own weight? Does it pay for itself?
  • The principle of least surprise (Mark Miller)
  • Path dependence
  • Readability trumps Writability: more people read than write
  • Forward compatibility
  • Tennent’s Correspondence Principle
  • Backwards compatibility / Web compatibility / Don’t Break The Web (domenic, jordan), “51% of the web browsers become “web reality”” – jordan
  • Terminology
    • Usability/Ergonomics
    • Consistency
    • Coherency
    • Cross cutting concerns


  • object capabilities
  • Single origin policy
  • communication channel
  • tampering


  • Popular opinion ( taking the feedback from the community constructively)

  • Polyfill considerations (libraries, frameworks, etc)

  • Transpilers (typescript, flow, coffeescript, babel)

  • Frameworks (angular, polymer, react, etc)

  • Implementation considerations (Vv8)

  • Other Standards (@jordan, overlap of HTML and now WASM, coordinating between standards communities, e.g. should standard libraries go to WHATWG or should them be JS, where do we draw the line?, tie the hands of TC39 when others move first, and vice versa)


  • proposal, optional chaining proposals, no arbitrary look ahead, context free, etc)

  • Unicode
  • proxies/membranes, 

  • Branding mechanisms

  • Currying operation – wycats

  • mangling 

  • EIBTI: explicit is better than implicit 

  • gravity well of incentives 

  • gradients to pursue in a gradient descent

Notes mentioning this note

There are no notes linking to this note.