-
Notifications
You must be signed in to change notification settings - Fork 112
/
Copy pathjuly-30.md
857 lines (485 loc) · 23.7 KB
/
july-30.md
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
# July 30, 2015 Meeting Notes
-----
Allen Wirfs-Brock (AWB), Sebastian Markbåge (SM), Jafar Husain (JH), Eric Ferraiuolo (EF), Caridy Patiño (CP), Waldemar Horwat (WH), István Sebestyén (IS), Mark S. Miller (MM), Adam Klein (AK), Michael Ficarra (MF), Peter Jensen (PJ), Domenic Denicola (DD), Jordan Harband (JHD), Jonathan Turner (JT), Paul Leathers (PL), Chip Morningstar (CM), Vladimir Matveev (VM), Ron Buckton (RBN), Brian Terlson (BT), Alan Schmitt (AS), Ben Newman (BN), Mohamed Hegazy (MDH), Abhijith Chatra (AC), Tom Care (TC), John Neumann (JN), Dave Herman (DH), Brendan Eich (BE), Daniel Ehrenberg (DE), Dan Gohman (DGN), Andreas Rossberg (ARB), Rick Waldron (RW), Mike Pennisi (MP), Akrosh Gandhi (AGI), Jonathan Sampson (JSN)
-----
## 7 Test262 Updates
(Brian Terlson, Mike Pennisi)
- [slides](https://jugglinmike.github.io/presentations/2015/tc39-Test262-update)
MP: Introduction
See slides
WH: (re: http://jugglinmike.github.io/presentations/2015/tc39-Test262-update/#7 ) question, re: es6draft, ecmascript spec, before/after publication?
?: es6draft ? ECMAScript 6 draft
BT: Ongoing. Could also add Chakra bugs
MF: raw flag? Does this prevent issues other than directive prologue issues?
MP/BT: "raw" means: don't touch the file, just run it. No access to assert features, useful for syntax only tests
[discussing distinction between early errors and parse errors that Test262 does]
http://jugglinmike.github.io/presentations/2015/tc39-Test262-update/#12
AWB: These are a specification artifact. An implementation doesn't have to do parsing and early errors in separate passes.
WH: This becomes visible when there are multiple errors, some in parsing and some early errors. Does the spec designate which error should be reported when there are multiple of these?
AWB: No. An implementation is free to report any of these errors.
AWB: Distinguishing early and parsing errors in tests is overspecifying.
(re: website improvements)
BT: current Test262 site does not have ES6 collatoral.
- Implementing ToLength appears to lock up the website
- Alot of work needed to get the Test262 site into a functional state
- Is the work something that Bocoup is going to do?
MP: Nearing end of time, but ideally would like to take on this work
BT: Then we need to find a "resource" for this project
- Enumerating outstanding issues with Test262 website
YK: Considered running tests in iframe or worker and timing out?
BT: Harness uses iframes
Discussion of implementation details of test harness
BT: Requirement of new site: use web workers
Moving on to http://jugglinmike.github.io/presentations/2015/tc39-Test262-update/#15
MP: (first example) TypedArray, 9 sets of the same tests. The tests might start in sync, but it's hard to maintain over time.
- Typed Arrays (9)
- Destructuring Assignment (3)
- AssignmentExpression evaluation
- ForIn/OfBodyEvaluation
- for..in statement
- for..of statement
- Spread Operator (4)
- ArrayLiteral: [...x]
- ArgumentList
- SuperCall: super(...x)
- CallExpression: f(...x)
- MemberExpression: new f(...x)
- Expressions & Declarations
- Function
- Generator
- Class
AWB: Similar to wanting to share code in tests, implementations will want to share code.
- Look at how an implementation and its tests go wrong?
- Tests that would catch the most common ways the implementation abstractions might go wrong
YK: Instead of testing all the things, find the things that might fail
- things that look similar, but are subtley different: test that.
MP: (gives an example of how strict and non-strict tests are automattically run, unless flagged)
WH: Value in testing exhaustively when the number of cases is reasonable. Per the presentation, there are only 18 contexts in which destructuring is used, which is reasonable for full cross-product testing.
- Re: Allen's point, there are subtle things that can go wrong. I can imagine an implementation getting destructuring right in most contexts but messing up some subtle aspect of it for, say, arrow function parameters.
- But still worthwhile to test try to be exhaustive
BT: Not suggesting that we won't test syntax in unique contexts
- More about the authoring
- For tests that cover identical syntax semantics and the only difference is syntactic context, then test once
- Why not sweet.js or an existing templating engine? We need to test syntax errors (and other negative tests)
WH: Just pick one that doesn't make you escape all of the ECMAScript syntax
Discussion, re: https://gist.github.com/jugglinmike/476bdb6dd69ffddaf9d2#syntax
AK: (concerns about useful output)
DD: most consumers clone the repo, so we need to make sure that we check the output as well
AK: I'm less concerned about running, but about the output that will inform me of the failure
BT: Don't want to check in the actual generated tests
- This proposal MUST make it easy to identify failures
- The test harness will write to disc the actual code that failed at the moment of failure
- produce, on-demand, the filled-in template
DE: For tests users, this can be automated?
BT: Yes.
#### Conclusion/Resolution
- Continue exploring test generation
## Meeting Schedule
(John Neumann)
JN: will propose a 2016 schedule in september. Need to know if we'll be in Europe?
- Switzerland: Geneva, Lugano, Montreux, Lausanne (Geneva may not work: too many attendants and too expensive)
- Germany: Munich
- France
- England
Discussion planned for next meeting
- September in Portland, hosted by jQuery/Yehuda
- November in Santa Clara, hosted by PayPal
JN: Need to confirm what the 7th edition will contain
YK: Straight forward, whatever is Stage 4 goes in the spec
AWB: (enumerating general spec process timelines)
- submission
- review
- 60 day opt-out
YK: That's after January?
AWB: Approximately end of January
YK: January is submission, work backward to find deadline.
Discussion re: time needed for Brian to integrate the stage 4 features.
#### Conclusion/Resolution
- Get proposals wrapped up if you want to get these features into the spec
## 6.4 Advance Async Functions to Stage 2
(Brian Terlson)
- [slides](async-function-updates.pdf)
BT:
Updates from Last Time
- Complete spec available ( http://tc39.github.io/ecmascript-asyncawait/ / https://github.com/tc39/ecmascript-asyncawait )
- Removed `await *`
- Implemented in Babel
- Losts of positive feedback from the web
DH: Future proof for potential future syntax extensions
DD: Clarify not `await *`
BT: `await *` was not useful. If there is a proposal for a useful semantics, then good, but not in this proposal.
Questions
- Async Arrow Function
- async (a, b) => await a + await b;
- (a, b) @=> await a + await b;
DE: What's the issue with the first?
BT: `async` not a keyword and that could be a call: `async(a, b)`
MM: @ seems like a poor choice, but I don't have an alternate suggestion
AWB: only b/c "a"sync
- the `async` form defeats the conciseness
BT: I've worked out the grammar, it needs review, but it appears to work correctly
YK: Shouldn't have 3 sigils right next to eachother.
- hard to google a sigil or set of symbols
- a "grawlix" problem
BT: Opposed with the top grammar? (assuming the grammar works)
(no opposition, pending review)
DH: Would like to see more code illustrating actual use cases
DD: There's a lot of code in the wild that's been using the top form
DH: Any higher order combinator is where this will have the most use.
MM: No consensus on the second. Consensus on the first contingient on grammar validation
DH: Cannot make `async` a keyword, one of the most popular modules on npm is `async`
DD: `Promise.all` doesn't quite work because it's a combinator that takes promises, not functions that return promises
DH: The syntax that we've come up with for past features like `=>` map to an extremely high use case with hardship. Not clear to me that we have the full async callback picture
DD: should look into the ecosystem of Babel users and see where it's come up
Design Questions (continued)
- Newing an async function:
- Error
- Promise-for-instance
BT: Suggest "no"
(no disagreement)
Design Questions (continued)
- Errors in Parameter Initialization
```js
function* foo(a = (function() { throw 1; }())) {
}
let iter = foo(); // throws 1
```
BT: the equivalent in async functions:
```js
async function bar(a = (function() { throw 1; }())) {
}
bar(); // as of the latest proposal, this throws 1
// Alternative semantics would have the error deferred:
bar().catch(cb => ...); // Possible semantics
```
DD: Wish this was caught for generators
AWB: We knew about it, but nothing can be done
MM: For generators, we have immediate throw
- Async function: throw in body breaks the promise
- think about _when_ the throw happens
- what way is it reported?
- throw in generator body is reported with a throw
- throw in async body is reported by rejecting promise
YK: when use promise, you can catch all the errors into one place
AK: Arguing for throw immediately?
BT: Yes, found that error throwing default parameters don't happen (rare case?)
- Mark's point about multiple symmetry in play
CM: setup preparation part, consumption part. The generator setup might have error in setup, reported immediately
DD: Code will expect to receive the error via the catch path, not an immediate throw path.
- Most promise ops go through the API
- Devs can muck with the built-ins and produce errors
AWB: What if you put a proxy on an async function and the call trap throws?
MM: There's not a problem with the [[Call]] trap. If the [[Call]] trap in the Proxy throws, then you have a "throw".
AWB: Say the async function is actually a proxy wrapped around an async function?
MM: It's exactly the same hazard as if you hand someone a function that wraps an async function and the wrapping function throws.
DD: Problem is thinking of async functions as a separate category. Just a function
DH: Mark, I agree. There are errors we consider normal to happen in programs that you should deal with, and those where soemthing went badly wrong and you can't write code that has try/catch every where. A function call that throws an exception should follow the error handling model for the programming paradigm that we're in; since we're in an aync world, the programming model for handlng errors is `catch`
BT: want to be very clear about rationalization, so that same can be applied to `async` generator.
AWB: The generator function returns its value before evaluating its body.
- A generator is a function
MM: An async generator... I missed the rest of this
YK: Can you `yield` in a default parameter in a generator?
AWB: No, you cannot `yield` there because the object doesn't exist yet.
BT: We need to establish the rationale for the behavior of error handling in non-simple generator parameter lists
YK: Might've been a mistake?
AWB: Generators do what generator functions previously did in Firefox. We weren't sure if it should be changed. Different results:
- timing evaluation changes: happen on the first `next`, the values aren't the same values at the time of the call.
DD: Generators suspend immediately, `async` suspend on the first `await`
DH: All cases, expect that parameter default expressions execute eagerly, not that they execute at some time later
DH: Generators are all about order of execution. The fact that generator functions and async functions have different control flow expectations means that it's reasonable for their error handling behavior to differ.
Discussion about complications of the implicit `yield` in generators
DH: Don't need symmetry between generator and async
YK: Async function is just a function, but the generator is a different thing.
- When calling a generator, you're not calling a function as shown
DD: When calling a generator function, the first line of the function does not execute
DD/YK: Agreed.
YK: The consequence is that the refactoring doesn't make sense.
Design Questions Continued
- Await synchronous things synchronously
- `await 1` does it trigger a turn of the event loop as in the desugaring?
- allow synchronous await but ensure promise resoltion is async?
- do neither and allow returning an already-resolved promise?
MM: describing the hazard of sometimes "sync" and sometimes "async"
????????????????Z??????????A???????????L????????????G????????????????????????? !????????????
:applause:
YK: The same hazard doesn't exist with await, because the callback model is changing which scope the function is called in, but doesn't exist in await.
MM: Agreed that the hazard to aync functions is smaller than that to Promises. The bugs will be both fewer and more subtle and harder to figure out.
DD: no cost to go back to the event loop
YK: not true.
- hot code is always awaiting some promise, could be optimized to consider inline-able. Never true if you always have to go back to the queue
MM: If an implementation can optimize, which is very hard and hazardous
YK: I'm making a different point. If you say. "you are not allowed to go back to the event loop" and if you discover that it is synchronous, then you can optimize by in-lining the synchronous code. In an ideal world, it is "just a loop", and a loop is fast.
JH: The relative harm: cost not zero, need to weigh
MM: Experience with `asap`, cost is worth it to reduce the hazard.
- When bugs do occur, very subtle and hard for programmer to figure out
YK: Hazard in the callback case is in pieces of code that are right next to eachother that appear to [...] Let me put it another way: the hazards you are talking about are based on assumptions that I would never make when writing a program.
MM: hazard as soon as mutated state is sufficiently non-local
YK: cannot rely on what interleavings are possible
BT: hazard here: order of your next turns change. not that callback could be async, but that your callbacks mayb run out of order. What Yehuda is saying is that people don't write programs with multiple Promises where they expect the promises to resolve at specific turns of the event loop.
MM: Two different hazards:
- The order of events on the event loop is one hazard
- the isolation of side effects is job that was executed up to the await point, completes before any code of the `await`
- All invariants storing during the job
Mark, I need you to fill this in, we're moving too fast.
YK: Transaction committed before any await is called. This exists in Ember.
- Need to see an example of the invariant Mark is describing
MM: After the await point, the callee is starting with a fresh stack.
- Event loop programming paradigm that suspends an invariant must restore the invariant before the job ends.
- Illustrates with example of doubly linked list operation
MM: Event loop concurrency requires restored invariants before the end of the event loop turn
YK: Different from what's encountered in practice
DD: What's the position?
YK: Discussing already-resolved-promises
DD: `await 1` is not the same as `await Promise.resolve(1)`
- If you have a promise, you've said that the value is async and breaking that is crazy
MM: Found with the Q.asap bug: I wrote my code, tested my code, then my code had bugs. Result of code running out of turn with test code.
YK: consistency is absorbed by syntax
MM: disagree
- The bug was directly the result of assuming the invariant will be resolved.
Discussion re: invariant restoration on event turn completion
```js
// BT:
foo().then( function() {
/* 1 */
});
/* 2 */
// Which is first
async funcion foo() {
/* 1 */
await x;
/* 2 */
// are these the same turn?
}
foo();
// HAZARD: setup state required by /* 2 */
```
Currently, `await` is always async.
JH: Concern that the notion of asynchrony bound to...?
MM:
JH: predicts that await means async to developers. await is composition.
DD: yield is composition
MM: asynchrony is mandated by the async keyword
JH: is that adequate? `async` means asynchrony, `await` does not mean asynchrony, just pause the execution.
YK: Come back to this?
Agreed. Next turn of the event loop.
JHD: Agree that `await x` always means `await Promise.resolve(x)`?
Some agreement.
YK: Doesn't fully describe the trade off
MM: Implementation prohibited from making optimization
JH: can we put together a program that illustrates the hazard?
```js
// BT:
foo().then( function() {
/* 1 */
});
/* 2 */
// Which is first
async funcion foo() {
/* 1 */
await x;
/* 2 */
// are these the same turn?
}
foo();
// HAZARD: setup state required by /* 2 */
```
YK:
```js
let x;
foo().then( function(val) { x = val; /* 1 */ } );
// what is x?
```
JH: Is that an issue in asap? or were there other issues?
```js
// BT & YK:
async function foo() {
// relies on y being `1`
await x;
// relies on y being `2`
}
let y = 1;
foo();
y = 2;
```
MM/DD/YK: discussing the hazards above.
AK: Different conditions, different behavior.
Discussion about race conditions in JS
DH: largely around the interleaving asynchronous events
- Mark wants this to be limited
MM: confirms
YK: When type `await`, I expect unpredictability
MM: unpredictable interleaving of job
DD:
```js
function dStuff() {
if (window.state === 1) { doA(); }
else { doB(); }
}
async function foo() {
doStuff(); await x; doStuff();
}
window.state = 1;
foo();
window.state = 2;
```
MM: impossible to reason about a program without knowing something about what is going on.
- testing in sync case, and it works
- execute in async case, and it fails
DD: Always have a consistent state on the next turn
Discussion, restating positions back and forth.
- Promise cancellation:
- Depends on cancellation at the promise level
- Urge promise champions to consider ergonomics with async functions
BT: not going to specify cancellation in this proposal
MM: Not sure that base Promise is going to change?
DD: Talk offline.
- Await at top-level
- Can you await at the top level of a module?
- Useful, especially in Node
DH: Issues.
YK: Previously, could assume that top level ran start to finish, if many pieces have setup await
AWB: this changes the entire model of module execution
BT: modules are wrapped in async function which called immediately
MM: after top level await point, import/export, are these effected?
AWB: initialization happens in the order of import/export but before the module body starts
MM: only "when" the execution happens
AWB: This could be misunderstood
DH:
```js
import ... from ...;
let m;
if (dev) {
m = await local.import("lib-dev");
} else {
m = await local.import("lib-production");
}
export let x = 17;
```
DH: Requires module be async.
Unresolvable if node remains sync at the top level.
(break)
DH: we need to do more work offline.
BT: is top level await worth pursuing?
DH: Addresses a definite need, eg. dynamic module loading
BT: Flesh it out?
DH: No, this needs to be designed in concert with loader. Suggest decoupling to unblock async/await
BT: Confirms.
- Waldemar's grammar concern?
WH: (presenting now)
```js
async(a=await/
```
- According to cover grammar, this is a division symbol
- Is await a keyword or identifier here?
BT: parsed like a keyword, but there is a static semantics that says any occurence of await expression is an error.
```js
async(a=await/x, b=c/i) => b;
```
- Parse cover grammar, don't know that you're in a arrow function. This lets await sneak through as an identifier
- When you do the reparse, `/x, b=c/i` is treated as a regexp
MF: The reparse says it has to match this additional grammar, same set of tokens
WH: It's not clear in the spec.
BT: Yes, the await would appear as an identifier until you apply the cover grammar.
MF: (reads from [ECMAScript 2015 specification, section 12.2.1.1](http://www.ecma-international.org/ecma-262/6.0/#sec-static-semantics-coveredparenthesizedexpression )
MF: if await is always an await expression, this would fail to reparse, resulting in a SyntaxError
BT: Correct, expected.
BT/WH to have offline discussion re: grammar.
BT: Those that know execution model should review this.
#### Conclusion/Resolution
- Stage 2 acceptance
- Reviewers
- Waldemar Horwat
- Jafar Husain
- Yehuda Katz
- `async (a, b) => await a + await b;` contingent on grammar validation
- `async` functions: no construct slot
- errors occuring in parameter initialization take the catch path
## 6.5 Proposed Changes to Observable API
(Jafar Husain)
https://github.com/zenparsing/es-observable/tree/zenlike
- [slides](https://docs.google.com/file/d/1uEVcOgJIMsHjN1vypKKyfmDRg_bz5cKXpo0v4Nc0q8NfqKolBeSDHIj8z9GS8A4EiMpZ8QQ3l87Q_wF3/edit?usp=docslist_api)
JH:
Conclusions after 45 Issues and Impl Work
- Generator should not be used Sink
- Sync Subscription Affirmed Necessary
- Can implement EventTarget using Observable
Using Generators as Sinks
Issues:
- Type Fudging (would like implicit {done: true})
- Priming Problem
- issue with implicit yield
- considered a decorator, but likely a footgun
- Return invoked on unsubscribe
- mistake because it conflates two concepts: the need to free scarce resources and the need to signal iteration has completed
- the equivalent to breaking out of a for loop,
YK: Why does it end up not being important to generators? (dispose being separated from return)
YK: Straight forward to add a `dispose()` method to Generator instance objects http://www.ecma-international.org/ecma-262/6.0/#sec-properties-of-generator-prototype
JH: Believe adding `dispose()` is good
DD: And/or remove `return()`. To remove the try/finally that's implicitly added around a for-of loop
Discussion, re: try/finally
JH: even if we fix the return/dispose conflation, the priming problem is still a compelling reason not to use generators as sinks
Using Generators as Sinks (continued)
Issues:
...
- Multiple unsub methods
Proposed Solution: Observer Type
(get bullets from slide)
Advantages of Observer Type
(get bullets from slide)
Proposed Observable Type Changes
(get code from slide)
DD: Strange to hide a method by using well-known symbol
- if sync subscription is allowed, just make it easy
WH: What does Symbol.observer return? (Not referring to the symbol, but to the method to which this is the well-known symbol-as-computed property name)
JH: Nothing
DD: What happened to the flush that we discussed?
JH: In progress
MM: What is the `Object?` in `Observer` type?
JH: Allowed to return something
(Should be "any")
MM: Why not just support the Observer (in `subscribe` method)
- Prefer two separate methods
JH: previously had a forEach that returns a promise, still exists, just not shown
Discussing a swath of code on jsbin
Sync Subscription Affirmed Necessary
- Necessary to build EventTarget using Observable
(get rest of bullets from slide)
Jafar moves through slides too fast.
DD: Would prefer something simpler than Symbol.observer, instead just call it something obvious
MM: Name it such a way that the name is clear to the user (no suggestion)
Discussion, re: await observable.
All scalar combinators produce promises or observables
#### Conclusion/Resolution
- Stage 1 holds
- Offline discussion, re: sync subscription
## 6.13 Advance Rest/Spread Properties to Stage 2
(Sebastian Markbåge)
https://github.com/sebmarkbage/ecmascript-rest-spread
SM:
Static Properties vs. Computed Properties
SM (slide): question on evaluating computed property keys multiple times on the LHS of a destructuring assignment?
SM (slide): question when a "rest" destructured object param throws (via getter, for example), should `rest` be undefined, or a partial object. or, should the getter be copied rather than evaluated
```js
try {
var throwingObj = {
x: 1,
y: 2,
get z() { throw myError; },
w: 4
};
var {x, ...rest} = throwingObj;
} catch (err) {
x; // 1
rest; // undefined (could be { y:2, w: 4 })
}
```
MM: possibilities?
SM:
- undefined
- { y: 2, w: 4 }
MF: also `{}` and `{ y: 2 }`
MM: further semantics need to be explored
#### Conclusion/Resolution
- Stage 2 acceptance
- Reviewers
- Andreas Rossberg