Is iced coffeescript supporting or going to support promises?

849 views Asked by At

As a node.js practitioner, I am actively using coffeescript and functions based on promises. Recently I have found out iced coffeescript, and I wonder whether my approach can go along with "iced await defer" one.

So here is my question, is there any support for the promises implemented or planned for the iced coffeescript? Or would rather iced coffeescript made me come back to the callback functions world?

Also as a side question, as far as my knowledge goes, there is an ECMAscript 7 draft to introduce await async patten to solve the issue. Is iced coffeescript team planning to blend on it if it will become standard?

Cheers.

2

There are 2 answers

0
Benjamin Gruenbaum On BEST ANSWER

Iced CoffeeScript development has stagnated lately. I regard ICS as interesting experiment - given its current adoption I would not really recommend using it. As for support or planned support there is none - there might be in the future but the issue tracker shows no issues discussing it have been opened.

ECMAScript 7 indeed has async functions - since those use promises there is no reason to assume any work is done in ICS to support them. Again - no one can tell the future and there might be work on those at a future point in time.

1
doublerebel On

Iced is certainly active and in many cases (like parallel calls) is more flexible than promises. There is now an open PR for ES7 async at maxtaco/coffee-script#147, and is far more simple than the open PRs on regular Coffee (#3757, #3813).

The easiest way to use Iced with Promises is to nodeify the Promise. I use many Promise-based libs in my Iced code without trouble.

I think most coders using Iced just far prefer the clean syntax of await/defer over promises. A major advantage of using Iced now, is that the Iced code that works now will also work in the future, despite whatever underlying changes happen in ES6/7 and Coffee implementations as syntax is finalized.