-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add yield support #3073
Comments
+1. I've been meaning to open an issue for support of all ES6 features. It raises the question of whether we want to adopt the ES6 syntax/semantics for features that we've introduced separately, for example list comprehensions and |
What about having a It would follow the Node.js and V8 practices, |
What do we do when ES6 is finalised and we want to make these features official? Have |
It is going to take some years to be outdated so I don't think it's meaningless and neither does the V8 and Node.js team. Because it is the only way to test forward the advance in JavaScript. |
@jashkenas: I'd really like to get your input on this, especially my first comment above. I feel pretty strongly that CoffeeScript needs to evolve or die, and also prefer that it remain a simple enhancement over what you can do with the latest version of ECMAScript (sans anti-features like
That last point's going to be tough. I don't want a separate ES3-target, ES5-target, and ES6-target compiler, and I'm sure you don't either. I think we should consider a flag like the suggested |
Agreed. I think that we should start considering the new features as soon as they begin to work in browsers, and on Node. Ideally, it'll continue to be a single target compiler, and your output JS will simply be ES3-incompatible if you use ES3-incompatible features (as it already is if you I think that evaluating and implementing these things as they arrive, is a fine way to get started. Yield is probably a good one to begin with. |
No, not necessarily. Just like CoffeeScript's semantics don't perfectly match ES3's. I think that our current Regardless, classes, super, and comprehensions aren't shipping in V8 just yet, are they? Aren't they still in flux? |
This is really encouraging! |
I've gone back and forth on this in my head. I think that the Ideal CoffeeScript is one that targets ES6 (with CS syntax and minimal semantic updates) and compiles to ES3 or ES5. However, I don't think that changing some things like super and comprehensions is a great idea at this point. So, I agree with the progressive approach. Starting with yield/generators sounds perfect because it's already being used in several interesting libraries. |
+1 |
+1 yield pretty please |
+1 ! |
+1 for yield |
+1, please yield! |
+1 yield |
We have a PR for that |
For those who continue to struggle: |
I did not understand, is |
You do not understand. 🐎 |
@monolithed, your joke is not relevant. Please write on the case. И таки да, шутку не оценил, лучше бы про yield сказал по делу. |
@socketpair, try ES6 |
Generator support now exists on master, and will go out with the next major release. (Unless I'm missing something?) |
You are missing ES6, why would you need to use outdated coffee when you can 2015-01-26 17:04 GMT+03:00 Brian Miller [email protected]:
|
Bummer, seems like there's no support for |
@MattKunze |
Awesome, thanks! Somehow missed that in the docs |
@jashkenas Do you think it would be unreasonable to target Babel and similar with CS output, rather than the 'bare-metal' runtimes? Cause that's kinda what I was contemplating. :) |
I know that the policy was not new adding new ES6 features.
But now, it's 2013,
and the latest V8 and Node.js 0.12 supports
yield
,which is one of the best features to prevent callback hell.
We should add support for it, because it really improves the current situation of callbacks spaghetti in Node.js.
Thank you.
The text was updated successfully, but these errors were encountered: