Skip to content
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

CS2 Discussion: Project: Progress as of April 2017: 2.0.0-beta1! #4973

Closed
coffeescriptbot opened this issue Feb 19, 2018 · 13 comments
Closed

Comments

@coffeescriptbot
Copy link
Collaborator

From @GeoffreyBooth on 2017-04-14 04:04

Hey everyone,

CoffeeScript 2.0.0-beta1 is released! Install it via: npm install coffeescript@next

Yes, coffeescript, not coffee-script. I hope to release the 2.x versions on coffee-script once we determine that it’s safe to do so. More on that here.

Since the last update and the 2.0.0-alpha1 release, as of 2017-04-14 the following has been merged into the jashkenas/coffeescript 2 branch:

As of February, we had accomplished:

As of December, we had accomplished:

And as of November, we had accomplished:


This wraps up all the features we had planned to be in scope for CoffeeScript 2! Hence this is the first beta release. The plan from here to 2.0.0 is to fix any bugs that people find, and release 2.0.0 out of beta as soon as we feel confident that it is stable.

That doesn’t mean development needs to stop! There’s still time for new features, both before and after 2.0.0 is released; though if your new feature is a breaking change, it should come before. Foremost among the upcoming features in progress is destructuring object spreads.

Please try 2.0.0-beta1 in your projects! And let us know if you encounter any issues, after first reviewing the breaking changes. If you think there’s a bug, please open an issue with “[CS2]“ in the title. Please don’t comment bug reports on this thread. Thanks!

@coffeescriptbot
Copy link
Collaborator Author

From @balupton on 2017-04-14 06:45

Congratulations to everyone involved on this!

How is linting and other ecosysten projects coming along on fhe CoffeeScript 2 front?

@coffeescriptbot
Copy link
Collaborator Author

From @GeoffreyBooth on 2017-04-15 21:28

CoffeeLint has a PR in progress to support CS2, but it could use some help.

@coffeescriptbot
Copy link
Collaborator Author

From @mikeyhew on 2017-04-20 18:41

Nice work @GeoffreyBooth et al! I'm already using the new beta in Rails with Webpacker, and it's just wonderful.

@coffeescriptbot
Copy link
Collaborator Author

From @GeoffreyBooth on 2017-04-20 19:43

@mikeyhew Thanks for the feedback! Anyone else using this on real projects? I’m feeling beta1 is probably stable enough to release as 2.0.0?

Can anyone think of any additional breaking changes we want to slip in before leaving beta?

@coffeescriptbot
Copy link
Collaborator Author

From @mikeyhew on 2017-04-20 22:48

I have an idea about reserving the word mixin... the new JS Classes lend themselves to a nice pattern for mixins, described here: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes#Mix-ins. If CoffeeScript supported that pattern natively that would be pretty cool.

You would declare a mixin with mixin Foo, just like declaring a class except it compiles to a function that takes a class Base as an argument and returns a class extending Base. Then you could use them like so:

class Bar extends SomeBaseClass with Foo, Baz

which would compile to

class Bar extends Baz(Foo(SomeBaseClass)) {}
// order of mixins reversed, so that Foo occurs higher on the
// prototype chain, with Baz possibly overriding Foo methods

@coffeescriptbot
Copy link
Collaborator Author

From @mikeyhew on 2017-04-20 23:47

Another really cool thing would be using ~ for postfix function calls, like @rattrayalex is doing for LightScript. To be able to add that at some point in the future without breaking backward compatibility, we'd have to disallow use of ~ as bitwise not. I really like that feature, but maybe it'd be better to just have it be a breaking change if/when it comes out - especially since I doubt ~ comes up much in CoffeeScript code. Or it could be an opt-in plugin?

Just thought I'd mention it.

@coffeescriptbot
Copy link
Collaborator Author

From @GeoffreyBooth on 2017-04-21 00:01

@mikeyhew I think the place for proposals is as new issues in this repo. Want to post these ideas there? For whole-cloth new features, presumably we would create a syntax for them that isn’t a breaking change, like you were mentioning with ~.

Are there any other potential features on the horizon that pose a breaking-change threat? I’m thinking specifically of new or upcoming ES features that we might want to adopt, that would imply a certain syntax if we want to mirror the ES syntax.

@coffeescriptbot
Copy link
Collaborator Author

From @connec on 2017-04-21 08:15

I'm loathe to bring it up... but we might want to have a plan for dealing with ES' class public fields Stage 2 proposal. The syntax that's currently under discussion conflicts with executable class bodies:

class A {
  own_property = 1
  own_method = function () {}
  own_bound_method = () => {}
}

Babel REPL


Compare this with the below, currently valid CoffeeScript code:

class A
  own_property = 1
  own_method = ->
  own_bound_method = =>

Try CoffeeScript

If we want to avoid breaking changes in the future it would make sense to have a plan for how to deal with these without breaking ECBs, or else let go of ECBs and patch them out of 2.

@coffeescriptbot
Copy link
Collaborator Author

From @connec on 2017-04-21 08:18

Another one to possibly have a plan for is decorators (even if the plan is to ignore them). These are also Stage 2.

@coffeescriptbot
Copy link
Collaborator Author

From @GeoffreyBooth on 2017-04-21 18:16

@connec We could have a section in the docs specifically about executable class bodies, warning people that their output will likely change in the future. It looks like the CoffeeScript syntax won’t be changing, but we’ll eventually be outputting ES output for these things as ES catches up to us. That shouldn’t break things, assuming the features’ implementations are equivalent to what we’re doing now, and if that’s the case then it’s not actually a breaking change (just a, you know, change). But we could warn people that there might be slight differences, which would be breaking changes.

@coffeescriptbot
Copy link
Collaborator Author

From @mikeyhew on 2017-04-21 21:54

@GeoffreyBooth understood. I opened #81 to talk about mixins. I still think that reserving mixin would go a long way, but maybe it's too late in the release process for that. It's up to you.

@coffeescriptbot
Copy link
Collaborator Author

From @GeoffreyBooth on 2017-04-21 22:03

Do we need a new keyword? The ES proposal doesn’t use one. Say we released 2.0.0-beta1 as 2.0.0 now, and wanted to add mixins later. Couldn’t we add them, and it wouldn’t be a breaking change?

@coffeescriptbot
Copy link
Collaborator Author

coffeescriptbot commented Feb 19, 2018

From @mikeyhew on 2017-04-22 01:02

@GeoffreyBooth I'm not aware of an ES proposal for mixins. Can you post a link in coffeescript6/discuss#81?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant