Brendan Eich (2013-11-26T01:04:06.000Z)
Kevin Smith wrote:
> To use Waldemar's word, I wonder if that might get obnoxious:
>
>     function(a = function(yield = function(arguments = function(eval) 
> {}) {}) {}) {
>       "use strict"; /* Doh! */
>     }

That's no different in kind from the ES5 + default parameters combo:

   function f(a = function(b = function(c, c) {}) {}) { "use strict"; }

Waldemar's general observation was

"It's easier to grammatically distinguish between being inside and 
outside a generator than it is to distinguish strict vs. non-strict.

To tell whether you're a strict function or not you need to lex the 
input.  To lex you need to parse it.  To parse it you need to figure out 
how to parse yield.  Hence you get an obnoxious circularity."

The obnoxiousness with 'yield' in a default parameter is obnoxious, but 
not by Waldemar's criterion, because (as my self-followup argued) it 
must be parsed as an identifier (whether or not "use strict" follows in 
the governing body). There is no parser -> lexer feedback, just deferred 
error checking.

/be
domenic at domenicdenicola.com (2013-12-10T01:15:34.570Z)
Kevin Smith wrote:
> To use Waldemar's word, I wonder if that might get obnoxious:
>
>      function(a = function(yield = function(arguments = function(eval) {}) {}) {}) {
>        "use strict"; /* Doh! */
>      }

That's no different in kind from the ES5 + default parameters combo:

```js
function f(a = function(b = function(c, c) {}) {}) { "use strict"; }
```

Waldemar's general observation was

"It's easier to grammatically distinguish between being inside and 
outside a generator than it is to distinguish strict vs. non-strict.

To tell whether you're a strict function or not you need to lex the 
input.  To lex you need to parse it.  To parse it you need to figure out 
how to parse yield.  Hence you get an obnoxious circularity."

The obnoxiousness with 'yield' in a default parameter is obnoxious, but 
not by Waldemar's criterion, because (as my self-followup argued) it 
must be parsed as an identifier (whether or not "use strict" follows in 
the governing body). There is no parser -> lexer feedback, just deferred error checking.