Interesting idea, but I'm not too thrilled at the idea of imputing
semantics of any kind to the mere juxtaposition of two constructs. And the
dot already has the clear meaning of "taking" something (currently, a
single property as a scalar) from an object, so it would seem to make sense
to extend t
On Wed, Sep 21, 2016 at 12:33 PM, Matthew Robb
wrote:
>
> On Wed, Sep 21, 2016 at 10:40 AM, Jason Orendorff <
> jason.orendo...@gmail.com> wrote:
>
>> Since all new syntax imposes some mental load on all language users, the
>> answer should be no unless the benefit is really dramatic, which I don
On Tue Sep 20 03:38 PM, Bob Myers wrote:
>
> People in the real world continue to wonder why they can't
> pick/destructure from objects into objects, instead of just variables.
>
> http://stackoverflow.com/questions/39602360/es6-destructuring-reassign
> ment-of-object?noredirect=1#39602360
See
Jonathan Bond-Caron wrote:
On Tue Sep 20 03:38 PM, Bob Myers wrote:
People in the real world continue to wonder why they can't
pick/destructure from objects into objects, instead of just variables.
Yeah, StackOverflow is hit pretty often with people asking how to do that.
Seems like allowin
On Wed, Sep 21, 2016 at 3:39 PM, Bob Myers wrote:
> > Some people on a web site are curious to know if they can reduce 2
> lines of JS code to 1 line
>
> Right, some people wanted to reduce 2 lines of JS code [...]
>
That is not historically how JS got destructuring.
> But it's a tiny bit more
This is a creative idea. I'd rather see it in the language than not. But
still half a loaf.
Minor nit: I don't see how this is a "simplification in object
destructuring". It has nothing to do with destructuring, right?
I assume that this would work as expected?
```
{SANDWICHES[mySandwichName]}
`
With regard to deep picking, with standard destructuring I write
```
const {foo: {bar: { qux }}} = obj;
```
which means
```
const qux = obj.foo.bar.qux;
```
In the proposed "pick/destructure into an object" syntax, I would use
identical destructuring syntax
```
obj.{foo: {bar: {qux}}}
```
whi
Bob Myers wrote:
This is a creative idea. I'd rather see it in the language than not. But
still half a loaf.
Yeah, it's not the whole thing, but I believe it's something the TC
could agree on before moving further.
Minor nit: I don't see how this is a "simplification in object
destructuring
First I'd like to state that I don't mean to suggest that this is
"simple", in practical terms, as either a spec change or in application of
the feature in day-to-day code.
On Thu, Sep 22, 2016 at 11:24 AM, Jason Orendorff wrote:
> I get that to you, that's all it is. But I have trouble seeing
Hi all!
I need some clarification around completion records.
Let me start with examples in the spec (7.0) and explain how I
understand them (and what I don't understand):
```
12.1.6 Runtime Semantics: Evaluation
IdentifierReference: Identifier
Return ?ResolveBinding(StringValue of Identi
10 matches
Mail list logo