Allen Wirfs-Brock (2013-08-10T00:37:34.000Z)
On Aug 9, 2013, at 4:21 PM, Brandon Benvie wrote:

> On 8/9/2013 4:03 PM, Allen Wirfs-Brock wrote:
>> const MUST = () => {throw TypeError("Missing required parameter"};
>> 
>> function foo (a=MUST(), b, c) {...}
> 
> But that doesn't work for:
> 
> ```js
> function foo({ a } = { a: MUST() }){}

this would expressed as:
    function foo( {a=MUST() }) {}
 
> foo({}); // doesn't throw
then the above throws and so does
   foo()





> 
> function bar({ +a }){}
> bar({}); // would throw
> ```
> 
> 
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
>
domenic at domenicdenicola.com (2013-08-19T04:57:39.693Z)
On Aug 9, 2013, at 4:21 PM, Brandon Benvie wrote:

> But that doesn't work for:
> 
> ```js
> function foo({ a } = { a: MUST() }){}
> ```

this would expressed as:

```js
function foo( {a=MUST() }) {}
```
 
> ```js
> foo({}); // doesn't throw
> ```

then the above throws and so does

```js
foo()
```