lydell / frappe

JavaScript with some nice fluff on top of it.
7 stars 1 forks source link

async functions #3

Open GabrielRatener opened 8 years ago

GabrielRatener commented 8 years ago

Since Babel supports async functions shouldn't Frappe as well?

lydell commented 8 years ago

Yes. Ideas?

GabrielRatener commented 8 years ago

I think the async keyword that will most likely be used in JS, is not the best way to go as it's too verbose. What about ~| Arguments > { Block }?

forivall commented 8 years ago

In tacoscript, I'm using +> and +=>. I was originally going to use ~> and ~=>, but found that it was a little bit too easy to confuse with ->. However, since frappe isn't using ->, ~| args... > would make sense. (I'd like to be able to support frappe's syntax choices in tacoscript eventually).

Livescript uses ~ as the binding operator, and doesn't support async functions yet.

TL;DR: +| Arguments > { Block } could also be an option.

lydell commented 8 years ago

What about regular function(){}?

vendethiel commented 8 years ago

It's livescript and you're wrong: our async function syntax is *->

vendethiel commented 8 years ago

Ah no, i'm mixing yielding and es7 async I think :). Carry on