Also, without a leading token, a selector expr with the optional chaining
operator inside a ternary operator would be ambiguous.
```
const contactSelector = true ? .contacts.email : .contacts.phone;
```
From: Isiah Meadows
Sent: 27 June 2019 19:18
To: Michael Luder-Rosefield
Cc: Simon Farrugia
I think you are misinterpreting the intent of the proposal. It is not
intended to handle logical expressions, that's way I called it Selector
Expression :-)
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss
I'ld say, if there is no valid reason why a wildcard is required for the
feature to actually work we should not add any. Else we would be just be
depriving future features from using that symbol.
Also, it does start to look a bit crowded with symbols if you consider the
optional chaining operator.
I was expecting that someone brings up the brackets property accessor at some
point.
I would argue that there is a bit of syntactic inconsistency since usually when
using the bracket accessors it is not preceded by a dot.
```
const getEmail = user => user["contacts"].email; // No dot between user
Using a recursive Proxy to achieve this is a really smart @Barret.
Having said that, a recursive proxy implementation would surely not be possible
without taking a significant performance hit.
Thus, I don’t think Proxies are ideal for anything that is meant to be widely
used throughout the cod
New syntax will always look a bit odd at first until we get used to it.
I sometimes find nested arrow functions a bit confusing to understand where
one function starts and where it ends particularly when they are one liners.
This syntax is more concise and personally I find it more readable.
Reas
#x27;d still need to reference `users`.
> Otherwise what are we mapping?
>
>
> ```
>
> const getEmailsList = users.map(.contacts.email);
>
> ```
>
> On Fri, Jun 21, 2019, 4:49 AM Simon Farrugia
> wrote:
>
>> Selector/Select Expression
>>
>>
&g
Selector/Select Expression
Doing functional & reactive programming is currently really verbose in
JavaScript.
Hopefully this issue will be alleviated with the addition of the pipe
operator in the near future.
One things you end up doing most when doing fp is doing simple selections
(mappings
8 matches
Mail list logo