Re: InterleavedTypedArray type

2017-07-03 Thread J Decker
On Mon, Jul 3, 2017 at 11:10 AM, Steve Fink wrote: > On 07/02/2017 11:20 AM, Lars Hansen wrote: > > On Sun, Jul 2, 2017 at 9:12 AM, J Decker wrote: > >> >> >> On Sun, Jul 2, 2017 at 8:25 AM, Lars Hansen wrote: >> >>> The TypedObjects

Re: InterleavedTypedArray type

2017-07-03 Thread Till Schneidereit
On Mon, Jul 3, 2017 at 8:10 PM, Steve Fink wrote: > TypedObjects are exactly what you want for this sort of use case, and are > really quite nice. I'm no expert, but TypedArrays probably ought to be > subsumed by the TypedObject spec since AFAICT they are a proper subset of >

Re: Declaration types inside destructuring declarations

2017-07-03 Thread Jordan Harband
``` const { a } = o; let { b } = o; b = 1; ``` seems like a much simpler workaround than adding this complexity to the language. Given your two examples, I'd find it bizarre for one to work and the other not, so we'd want to support both. It also raises the question of declaration-less

Re: InterleavedTypedArray type

2017-07-03 Thread Steve Fink
On 07/02/2017 11:20 AM, Lars Hansen wrote: On Sun, Jul 2, 2017 at 9:12 AM, J Decker > wrote: On Sun, Jul 2, 2017 at 8:25 AM, Lars Hansen > wrote: The TypedObjects proposal does this,

Declaration types inside destructuring declarations

2017-07-03 Thread Bob Myers
Totally minor, but ``` const {a, b} = o; b = 1; ``` Complains that `b` is `const` and can't be assigned. ``` let {a, b} = o; b = 1; ``` Now lint complains that `a` is never modified, and ought to be `const`. So I would like to write: ``` const {a, let b} = o; b = 1; or alternatively

RE: Pattern matching?

2017-07-03 Thread Alex Deas
I like pattern matching but don't think it would work well for ES, although I'd love to see a proposal that proves me wrong. My main concerns would be: * What are you matching on? Constructor, `instanceof`, duck typing, prototype etc * What happens when one type can be coerced to