Re: Proposal: anaphoric if and while syntax

2016-09-16 Thread Bob Myers
I often find myself wanting to do this in the case of `while`. I've been writing ``` for (let a; a = someLongCondition();) { doSomethingWith(a); } ``` In that spirit, an oddball proposal: ``` while (let a = someLongCondition(); a) { ...use a... } if (let a = someLongCondition(); a) { ...use

Re: Existential Operator / Null Propagation Operator

2016-09-16 Thread MichaƂ Wadas
Would break the web. On Fri, Sep 16, 2016 at 1:55 AM, Ron Waldon wrote: > Once upon a time, there was a fascinating proposal on this subject: > - https://github.com/sebmarkbage/ecmascript-undefined-propagation > > Rather than introduce new syntax, Sebastian's proposal was

Re: Proposal: anaphoric if and while syntax

2016-09-16 Thread J Decker
On Fri, Sep 16, 2016 at 2:43 AM, Bob Myers wrote: > I often find myself wanting to do this in the case of `while`. I've been > writing > > ``` > for (let a; a = someLongCondition();) { doSomethingWith(a); } > ``` > > In that spirit, an oddball proposal: > > ``` > while (let a =

Re: Proposal: anaphoric if and while syntax

2016-09-16 Thread J Decker
On Fri, Sep 16, 2016 at 10:43 AM, J Decker wrote: > I saw it mentioned in several messages earlier about the comma operator as > applied to the let/var statement... I suppose that IS an issue. > > for example : if( let a = 1, b = 0 ) > 1) if( 1, 0 ) the comma operator

Re: Proposal: anaphoric if and while syntax

2016-09-16 Thread J Decker
I saw it mentioned in several messages earlier about the comma operator as applied to the let/var statement... I suppose that IS an issue. for example : if( let a = 1, b = 0 ) 1) if( 1, 0 ) the comma operator clears the expression stack and results with only the value after the comma... so