Re: please add x .= f()

2015-08-11 Thread Isiah Meadows
Okay... Maybe not CoffeeScript (don't normally use it), but I know a few notable derivatives have that (particularly Coco and LiveScript). As for the idea itself, still a -1 from me. Unless we add an equivalent for every binary operator, it's not much of an addition. It's just another special

Re: please add x .= f()

2015-08-10 Thread Florent FAYOLLE
Hello, x .= f() should be syntax sugar for x = x.f() x .= f().g().h() should be x = x.f().g().h() +1! I've made some weeks ago a prototype of this in sweet.js: https://github.com/fflorent/member-access-assignment Except that the syntax is rather =. (I have probably been influenced by the

please add x .= f()

2015-08-10 Thread Soni L.
x .= f() should be syntax sugar for x = x.f() x .= f().g().h() should be x = x.f().g().h() -- Disclaimer: these emails are public and can be accessed from TODO: get a non-DHCP IP and put it here. If you do not agree with this, DO NOT REPLY. ___

Re: please add x .= f()

2015-08-10 Thread Brendan Eich
Do not send Please add messages with two-line, half-baked sketches of extensions to the language. That's just injecting noise with very little signal. The -1 you received will be the answer if pressed from everyone on TC39, I would bet real money. Syntax is expensive, adding it for little

Re: please add x .= f()

2015-08-10 Thread Andrea Giammarchi
I want to +1 the -1, but I'll add a Please no instead as well. On Mon, Aug 10, 2015 at 6:42 PM, Bucaran jbuca...@me.com wrote: -1 Please no :) On Aug 11, 2015, at 2:40 AM, Soni L. fakedme...@gmail.com wrote: x .= f() should be syntax sugar for x = x.f() x .= f().g().h() should be x

Re: please add x .= f()

2015-08-10 Thread Bucaran
-1 Please no :) On Aug 11, 2015, at 2:40 AM, Soni L. fakedme...@gmail.com wrote: x .= f() should be syntax sugar for x = x.f() x .= f().g().h() should be x = x.f().g().h() -- Disclaimer: these emails are public and can be accessed from TODO: get a non-DHCP IP and put it here. If you

Re: please add x .= f()

2015-08-10 Thread Jordan Harband
For that, you'd do `if (s.charAt(0) === '/') { s = s.slice(1); }` - which is only slightly more verbose than your example, without the burden of new syntax. On Mon, Aug 10, 2015 at 1:57 PM, Soni L. fakedme...@gmail.com wrote: Welp I keep replying this wrong (how should I configure my email

Re: please add x .= f()

2015-08-10 Thread Alexander Jones
Not sure if trolling... On Monday, 10 August 2015, Soni L. fakedme...@gmail.com wrote: x .= f() should be syntax sugar for x = x.f() x .= f().g().h() should be x = x.f().g().h() -- Disclaimer: these emails are public and can be accessed from TODO: get a non-DHCP IP and put it here. If you

Re: please add x .= f()

2015-08-10 Thread Andrea Giammarchi
had same feeling just reading the initial email ... fakedme+es@ ... On Mon, Aug 10, 2015 at 8:50 PM, Alexander Jones a...@weej.com wrote: Not sure if trolling... On Monday, 10 August 2015, Soni L. fakedme...@gmail.com wrote: x .= f() should be syntax sugar for x = x.f() x .= f().g().h()

Re: please add x .= f()

2015-08-10 Thread myemailum14
Please no, while i can see how logically it's derived from a = a + 1 a = a.f() a .= f() seems like a bad idea i can hardly see the dot why would i replace the object from which i'm calling the method in most cases looks inefficient On Mon, Aug 10, 2015 at 2:07 PM, Brendan Eich

Re: please add x .= f()

2015-08-10 Thread Andrea Giammarchi
not only it's badly readable and reminds me the PHP string concatenation, but it promotes different type assignment which is a performance, and virtually strongly typed, anti-pattern. I think Brendan said already it all, the proposal is badly described, and it solve pretty much nothing in the

Re: please add x .= f()

2015-08-10 Thread Bergi
Isiah Meadows schrieb: That's not really the point. The suggestion is this instead: ```js if (s[0] === '/') s = s.slice(1); if (s[0] === '/') s .= slice(1); ``` This already exists in CoffeeScript and most derivatives/dialects. ```coffee s .= slice 1 if s[0] is '/' ``` Don't know of any

Re: please add x .= f()

2015-08-10 Thread Isiah Meadows
That's not really the point. The suggestion is this instead: ```js if (s[0] === '/') s = s.slice(1); if (s[0] === '/') s .= slice(1); ``` This already exists in CoffeeScript and most derivatives/dialects. ```coffee s .= slice 1 if s[0] is '/' ``` Don't know of any other languages that have an

Re: please add x .= f()

2015-08-10 Thread Iago Sousa
I vote for no. There is no performance gain and I can hardly see anyone using it. Em seg, 10 de ago de 2015 às 22:18, Isiah Meadows isiahmead...@gmail.com escreveu: That's not really the point. The suggestion is this instead: ```js if (s[0] === '/') s = s.slice(1); if (s[0] === '/') s .=