1. 2
  1.  

    1. 2

      Hm I guess they want to eliminate print statements and use “unparse” derived from a grammar instead.

      I think the ES6 auto-escaping approach is pretty much as good and still lets you use print statements…

      You define an html() function and then tag the literal with it:

      console.log(html`<b>${username} says</b>: "${tag}"`);
      

      https://developers.google.com/web/updates/2015/01/ES6-Template-Strings

      Also I criticized the broader program here:

      https://lobste.rs/s/uyjzjc/science_insecurity_meredith_l_patterson#c_pzjzxh

      I think they picked a good example in HTML, because a subset of it can be described well with a CFG. But CFGs don’t work well for many network formats. With respect to parsing, HTML is more like a programming language than a network protocol.