> Can anybody name the pitfalls or point to where they have been mentioned
(if any have been)?
The pitfalls have been mentioned in various responses on related threads
over the last year or two.
I will take a stab at summarizing them, with my response/comments to each.
Apologies in advance if I mi
Yes it seems like a natural combination of the destructuring and object
shorthand features (the `=` version that is). Can anybody name the pitfalls
or point to where they have been mentioned (if any have been)?
On Sun, 18 Mar 2018 at 08:52 Michael Theriot
wrote:
> Not up to speed with any pitfal
Not up to speed with any pitfalls already discussed but for what it's worth I
tried this at least a few times when destructuring landed and was disappointed
it didn't work.
> On Mar 16, 2018, at 4:30 PM, Sebastian Malton wrote:
>
> Hello currently the following is a possible way to define an o
> the last point doesn't haven't the same usability as my proposal since with
> mine multiple different objects can be selected from at a time
I believe that you could use Bob's proposal like this:
```js
var obj = {...obj1.{prop1, prop2}, ...obj2.{prop3, prop4}};
```
-- Oriol
__
To: sebast...@malton.nameCc: jackalm...@gmail.com; es-discuss@mozilla.orgSubject: Re: Expanding Object Shorthand I'm glad to see we are continuing to discuss this. It demonstrates some degree of interest in the community for this feature, some degree of need.With regard to Tab Adkins Jr.'s post:
like how the shorthand works
>
> Sebastian Malton
>
>
> Original Message
> From: jackalm...@gmail.com
> Sent: March 16, 2018 5:26 PM
> To: sebast...@malton.name
> Cc: es-discuss@mozilla.org
> Subject: Re: Expanding Object Shorthand
>
> On Fri, Mar 16, 2018 at 1:5
works
Sebastian Malton
Original Message
From: jackalm...@gmail.com
Sent: March 16, 2018 5:26 PM
To: sebast...@malton.name
Cc: es-discuss@mozilla.org
Subject: Re: Expanding Object Shorthand
On Fri, Mar 16, 2018 at 1:58 PM, Sebastian Malton wrote:
> Yes that is possible but what if you wa
On Fri, Mar 16, 2018 at 1:58 PM, Sebastian Malton wrote:
> Yes that is possible but what if you want to do the following?
>
> ```
> var a = {
> b: B.b,
> c: B.c,
> d: B.d,
> e: B.e
> };
> ```
>
> Would it not be easier to do the following?
>
> ```
> var a = {
> { b, c, d, e }:
: March 16, 2018 4:49 PM
To: sebast...@malton.name
Cc: es-discuss@mozilla.org
Subject: Re: Expanding Object Shorthand
On Fri, Mar 16, 2018 at 1:30 PM, Sebastian Malton wrote:
> Hello currently the following is a possible way to define an object.
>
> ```
> var d = { a, b, c };
> ```
&g
On Fri, Mar 16, 2018 at 1:30 PM, Sebastian Malton wrote:
> Hello currently the following is a possible way to define an object.
>
> ```
> var d = { a, b, c };
> ```
>
> But this only works if the fields are already variables.
>
> So if you wanted to select some fields from an object within you hav
Hello currently the following is a possible way to define an object. ```var d = { a, b, c };```But this only works if the fields are already variables.So if you wanted to select some fields from an object within you have to use temp variables, reference the field by name but without the temporary
11 matches
Mail list logo