Re: Proposal: if variable initialization

2018-03-23 Thread kai zhu
unlike all other popular c-derivatives, javascript is the only one that's *not* a blocking-code language by design. maybe tc39 should do some outreach to educate the many language-designers and polyglots who only know blocking-code patterns of this simple fact. as i've said before, adding thes

Re: Proposal: if variable initialization

2018-03-23 Thread Rodrigo
@Naveen, I think it's best to avoid this road altogether and keep initialization clean, even though assignment isn't. The proposal is that given `for(;;)` hence `if(;)` instead of given `x=y` hence `let x=y`. But yes, `if( x = 5)` is already allowed, but it's confusing and hard to read. Confusin

Improved syntax for observable mapping and subscribing

2018-03-23 Thread Bob Myers
Could someone jog my memory about proposals for better syntax for observable mapping and subscribing, if any? I'm getting really tired of writing ``` foo$.pipe(map(bar => mapper(bar))) ``` I would much prefer to write something along the lines of ``` stream function fooMapper(foo$) { while as

Re: Improved syntax for observable mapping and subscribing

2018-03-23 Thread Thomas Grainger
You can convert an observable into an async iterator. You have to choose between discarding or buffering uniterated items On 23 Mar 2018 14:39, "Bob Myers" wrote: > Could someone jog my memory about proposals for better syntax for > observable mapping and subscribing, if any? > > I'm getting rea

Re: Re: Add "???" Unimplemented

2018-03-23 Thread dante federici
Simple example (ts): ```typescript interface SearchFunc { (source: string, subString: string): boolean; } // Later let mySearch: SearchFunc; mySearch = function(source: string, subString: string) { ??? } ``` Simple example (js): ```js class MyClass = { foo() { return "foo"; } bar() { ret

Re: Allow Object Destructoring when assigning

2018-03-23 Thread Isiah Meadows
Oops...I misinterpreted the original email. :-) As for forcing reinterpretation, I stand by my suggestion in an earlier reply: > It's not easy to parse for similar reasons async arrow functions are a > bitch to parse, but it appears possible (it'd force a shift instead of > a reduce, and it'd rei

Re: Operator for Currying

2018-03-23 Thread Isiah Meadows
I do agree with much of your sentiment. I do have a few points inline, though: - Isiah Meadows m...@isiahmeadows.com Looking for web consulting? Or a new website? Send me an email and we can get started. www.isiahmeadows.com On Thu, Mar 22, 2018 at 6:43 PM, Tab Atkins Jr. wrote: > While I

Re: Improved syntax for observable mapping and subscribing

2018-03-23 Thread Isiah Meadows
I've already looked into this kind of thing myself privately. I came up with this last year [1], and I more recently came up with this [2] (the second is much better IMHO). Both of those offer solutions to this problem, and they do in fact offer ways for 1. iteration, and 2. mapping/filtering/etc.