[ClojureScript] Re: When will the async/await feature in ES8 be introduced in ClojureScript?

2018-05-25 Thread Thomas Heller
> > > not quite! core.async doesn't allow you to cancel a go-block (to my > knowledge), which JS allows. I added a section on this: > > > https://beta.observablehq.com/@shaunlebron/proposal-generators-and-async-functions-in-clojurescript#coreasync > > This is incorrect. Closing a channel can be

[ClojureScript] Re: When will the async/await feature in ES8 be introduced in ClojureScript?

2018-05-25 Thread Shaun LeBron
Right! The proposal mentions that go-blocks must check for a closed channel at every step in order to exit early. So I'll revise the title—core.async cannot stop *arbitrary* go-blocks. For example, with this staggered animation code, it's not immediately clear to me how to exit after any

[ClojureScript] Re: When will the async/await feature in ES8 be introduced in ClojureScript?

2018-05-25 Thread Didier
I think compatibility shouldn't be an issue. Doesn't the async fn just return a promise? So you should be able to call an async fn from ClojureScript. -- Note that posts from new members are moderated - please be patient with your first post. --- You received this message because you are

[ClojureScript] Re: When will the async/await feature in ES8 be introduced in ClojureScript?

2018-05-25 Thread Shaun LeBron
thanks! added: https://beta.observablehq.com/@shaunlebron/proposal-generators-and-async-functions-in-clojurescript#macros On Friday, May 25, 2018 at 1:24:07 PM UTC-5, Didier wrote: > > For example this blog post shows compatibility: > https://blog.jeaye.com/2017/09/30/clojurescript-promesa/ >

[ClojureScript] Re: When will the async/await feature in ES8 be introduced in ClojureScript?

2018-05-25 Thread Thomas Heller
Yes, core.async is not great for this but it was also not meant for this. The big abstraction there are channels or CSP. There are "zero" channels involved in your example so you could probably find a better abstraction to fit here. There are several different concurrency models and all of

[ClojureScript] Re: When will the async/await feature in ES8 be introduced in ClojureScript?

2018-05-25 Thread Didier
For example this blog post shows compatibility: https://blog.jeaye.com/2017/09/30/clojurescript-promesa/ And also gives a nice little macro so you can use similar syntax to async and await. The biggest downside is that all the sugar is in a macro, and thus can't rewrite across function

[ClojureScript] Re: When will the async/await feature in ES8 be introduced in ClojureScript?

2018-05-25 Thread Shaun LeBron
agreed that core.async is not relevant to this discussion. I suppose the main question is—how should ES6+ (ES Next) features be made available to CLJS users. Is the story going to be "All of ES5 is accessible from CLJS—but you must use an external JS file for ES Next features"? (I added