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

The Plan for 1.0 #830

Closed
jashkenas opened this issue Nov 4, 2010 · 12 comments
Closed

The Plan for 1.0 #830

jashkenas opened this issue Nov 4, 2010 · 12 comments

Comments

@jashkenas
Copy link
Owner

Hey Team.

Over the past month, after 0.9.4 was released, CoffeeScript has been in a serious state of flux. satyr has contributed a number of cleanups/refactors/optimizations, as well as a number of ideas that add features to CoffeeScript's syntax, while simplifying the underlying semantics (some of which are currently on master, and some are on satyr/coco).

The hard deadline for a CoffeeScript 1.0 is the first anniversary of the initial release: Christmas day, at the end of next month. I'd like to get a 0.9.9 out as soon as possible, so we can have at least a month for a shakedown cruise. The experimental features currently on master have been kicking around for long enough now, and debated enough, that I think we can move forward with decisions about them. So, here's the plan:

  • Bring back the automatic closure wrapper for functions being generated in loops (generating the inner closure outside of the loop itself, for efficiency). I realize quite well that it changes how inner variables leak into outer scope, but that's something that you can't depend on in general, in CoffeeScript, because of our general use of closure-wrapping for converting statements into expressions.
  • Bring back the old range syntax, at the very least for range literals and comprehensions, and perhaps for slices and splices as well.
  • Figure out the deal with the executable branch. Try to get executable class bodies onto master, with static inheritance instead of the "extended" hook.

... that's about all I think needs to be done before a 0.9.9. Hope that sounds good to everyone.

Edit (2): Had (another (another)) change of heart about the ranges...

Edit (3): Introduce executable class definitions, and static inheritance.

@jashkenas
Copy link
Owner Author

The automatic closure wrapper in loops that contain function definitions is now back on master. It includes the function hoisting that removes the closure from the body of the loop, speeding things up considerably. For example, this CoffeeScript:

for i from 1 to 3
  funcs.push -> puts i

Now compiles into this JavaScript:

var _fn;
_fn = function(i) {
  return funcs.push(function() {
    return puts(i);
  });
};
for (i = 1; i <= 3; i++) {
  _fn(i);
}

@satyr
Copy link
Collaborator

satyr commented Nov 4, 2010

satyr/coco

is now at https://github.com/satyr/coco.

It'll keep the look and feel, but have different approaches including more eagerness to adopt new ideas.

@nathany
Copy link

nathany commented Nov 4, 2010

Okay. So once ranges are back, is the plan to fix the issues? Such as the one satyr pointed out #746?

@nathany
Copy link

nathany commented Nov 4, 2010

I guess that means ECMAscript 5 sugar will come post-1.0? Makes sense to me, as Chrome 7 is the only released browser with support.
http://kangax.github.com/es5-compat-table/

@jashkenas
Copy link
Owner Author

What ECMA5 sugar are you proposing in particular?

@TrevorBurnham
Copy link
Collaborator

Jeremy, since it sounds like you're still on the fence about ranges, etc., I've opened a new issue on the subject, issue 835. I apologize for the repeated discussions, but I hope that having two concrete proposals on the table (satyr's and my own) will help you and the CoffeeScript community reach something resembling a consensus.

@nathany
Copy link

nathany commented Nov 4, 2010

Jeremy, I'm thinking of getters/setters and immutable values, but I haven't worked out specific syntax/translation in my head as of yet. fn = (val)= -> @val = val seems a bit odd.

@nathany
Copy link

nathany commented Nov 4, 2010

Jeremy, another case to watch for will be for i from -10 until -1.

until (or til) introduces some extra logic that to doesn't have.

@jashkenas
Copy link
Owner Author

I've now got a first draft of the safe range comprehensions on master.

@nathany
Copy link

nathany commented Nov 5, 2010

(imo) CoffeeScript needs to pick a direction.

Is it intended to be a lightweight sugar coating that melds YAML and JavaScript? This is a fine direction, where libraries can take care of any additional functionality, and already appear nicer because of the basic sugar.

Or is it intended to support features like #835 and #827 that could make the language more pleasant, especially for people familiar with the languages that inspired those features?

@danielribeiro
Copy link

I don't know. I'd say coffeesript doesn't change much its intent by adding #835 and #827 tickets. It is already a sugar coat to javascript as much as Scala is a sugar to Java (maintained the proper dimensions, as java is vastly less powerful and concise than scala).

I'd like it to be more aggressive on its approach in the future, eventually adding even more powerful features. For now, getting to 1.0 should prove to be good enough, while still being enough trouble.

@jashkenas
Copy link
Owner Author

Alrighty ... 0.9.5 is now out, which can be considered an early release candidate for 1.0. Closing this ticket.

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

No branches or pull requests

5 participants