- Notifications
You must be signed in to change notification settings - Fork4
CS2 Discussion: Project: Progress as of December 2016 #56
Description
We’re getting close. Since thelast update, as of 2016-12-01 the following has been merged into thejashkenas/coffeescript2
branch:
- Tagged template literals, thanks to@greghuc.
- Interpolated strings are now output as template literals (ES backtick syntax), thanks to@greghuc.
- Triple-backtick operator and escaped backticks in embedded JavaScript, thanks to@GeoffreyBooth.
- The browser tests work again, thanks to@GeoffreyBooth.
And as of November, we had accomplished:
- Async/await, thanks to@GabrielRatener.
- Arrow functions, function default parameters and function rest parameters, thanks to@GeoffreyBooth.
- Splats in arrays and function calls are output using ES2015 syntax, thanks to@connec.
- Computed properties are output using ES2015 syntax, thanks to@connec.
- Octal and binary literals are output as-is, thanks to@JimPanic.
- CoffeeScript is stricter about whitespace thanks to@eelco, andLiterate CoffeeScript now understands Markdown thanks to@billymoon.
- Support forES2015
for...of
isimplemented, thanks to@atg. - Bugs were fixed by@alangpierce,@shreeve,@JimPanic,@GeoffreyBooth and others. Also thanks for feedback from@lydell and@jashkenas.
We’re closer than ever onclasses.jashkenas/coffeescript#4354, by@connec, implements CoffeeScript classes compiled into ES classes, preserving just about all backward compatibility and outputting via theclass
keyword, allowing CS classes to extend ES classes. All tests pass.
The PR is a hybrid, though, between the old 1.x output and idiomatic ES output. Classes to be extended are passed in via a wrapper andsuperClass
;super
is implemented via statements likea.__super__ = superClass.prototype
, etc.@connec’s current plan is to finish reorganizing the code in the current PR, then use a separate PR for cleaning upsuper
. Assistance with this effort is welcome. Once the current classes PR and follow-onsuper
PR are merged in, we can release the first alpha of CoffeeScript 2.0.0. We shouldn’t release 2.0.0-alpha1 any sooner, though, in case the current approaches to classes need reworking that might break backward compatibility more than the current PR does (for example, ifsuper
ultimately can’t be used as is without changes).
Aside from that, we’ve crossed off most of the items on ourfeatures list. The only other item remaining isoutputting ES2015 destructuring syntax, which should be along the lines of the already-completedES2015 computed properties. Anyone up for this one?
Any day nowCoffeeScript 1.12.0 will be released, which will bring tagged template literals,for…from
and the triple-backtick operator to the 1.x branch. Let’s follow it up with 2.0.0-alpha1!