The committee has made it clear in their 2018 tc39 day III notes that they
have enough sugar in the specification. Any further PRs are unlikely to be
championed, so perhaps this is moot.
--
Abdul S.
___
es-discuss mailing list
es-discuss@mozilla.org
I don't understand; a = a.map(...) works fine--not something I would write, I
tend to use single assignment style.
Perhaps I misunderstood, because both of your examples produced strings, and
you used the same ${} notation as template literals. Now,I think you want is
some sort of syntactic
Proposals always have a cost. Thus, every proposal *always* must justify
why it's useful, or else it's never going to be worth making a change to
the language.
On Fri, May 11, 2018 at 11:25 PM, kdex wrote:
> Well, if we really want to delve into linguistics, it's more the opposite
Well, if we really want to delve into linguistics, it's more the opposite of
what you're describing: Tons of languages have grammatical features that make
English one of the most nondescriptive and ambiguous languages out there:
Grammatical cases and gender, a wider variety of tenses, moods,
And, as an aside, i take umbrage with contributors whom require us to
explain why a suggestion or a proposal is useful: Just because something
can be done one way -- does not mean its the only way it should be done, if
our goal in javascript is flexibility/versatility: The english language is
I'm familiar with Array.prototyp.map functionality and I've ran into
problems with it when attempting double assignments (eg. a=a.map(...)) or
when omitting the RETURN keyword (eg . a.map((x)=>{1}) !=
a.map((x)=>{return 1})
I feel it needs cleaning up a bit, which is why I made such suggestion.
Useful or not, it can already be done clearly and concisely:
```jslet a = [1,2];
let b = a.map(x => `I have ${x} apples now`);
// If using a lot of these, try a tagged template literal:
function shabazz(strings, a) {return a.map(x => strings.join(x))}
let c = shabazz`I have ${a} apples now`;
let
"I have no idea why this is useful" is a non-starter.
On Friday, May 11, 2018 7:58:55 PM CEST Abdul Shabazz wrote:
> Similar to Matlabs operations on sets
>
> Example 1:
>
> let a=[1,2,...];
> let b="I have ${a} apples now"; // b=["I have 1 apples now ", "I have 2
> apples now",...]
>
>
>
8 matches
Mail list logo