Re: Re: Proposal: Allow Symbols behavior to treat entire Array as 1-instance variables

2018-05-12 Thread Abdul Shabazz
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

Re: Re: Proposal: Allow Symbols behavior to treat entire Array as 1-instance variables

2018-05-12 Thread Jerry Schulteis
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

Re: Proposal: Allow Symbols behavior to treat entire Array as 1-instance variables

2018-05-12 Thread Jordan Harband
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

Re: Proposal: Allow Symbols behavior to treat entire Array as 1-instance variables

2018-05-12 Thread kdex
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,

Re: Re: Proposal: Allow Symbols behavior to treat entire Array as 1-instance variables

2018-05-11 Thread Abdul Shabazz
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

Re: Re: Proposal: Allow Symbols behavior to treat entire Array as 1-instance variables

2018-05-11 Thread Abdul Shabazz
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.

Re: Proposal: Allow Symbols behavior to treat entire Array as 1-instance variables

2018-05-11 Thread Jerry Schulteis
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

Re: Proposal: Allow Symbols behavior to treat entire Array as 1-instance variables

2018-05-11 Thread kdex
"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",...] > > >