-
Notifications
You must be signed in to change notification settings - Fork 2k
CS2 Discussion: Question: New sugars? #4940
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
Comments
From @Inve1951 on 2016-09-25 00:36 I can't think of anything different than classes which they could screw up for CS. (which only happened because those can't extend each other properly) Worst case scenario if adding more sugar would be different syntax to JS. I wouldn't miss the oportunity to make CS more pleasant and powerful just because the guys over at ECMA/ES might do something a little different. (like using backticks for template literals) Tell me if I missed something there. |
From @mrmowgli on 2016-09-25 10:15 I also think it's good to remember that CS generates javascript, it doesn't have to look like Javascript. For that matter if the way CS does it results in faster, more reliable code, then we don't even directly need to generate ES6+ code. ES clearly stole many concepts from CS, because of that innovation. That being said, one of the reason we have so much sugar in the first place, and some of that was understanding deeply how ES actually behaved. I don't think we will really know what sugars we want to add until we see the patterns of use emerge from the new ES fixtures. So I'm all for adding sugars that actually improve CS, especially if it results in better code. But that also means we don't really know what that will be yet. |
From @jcollum on 2016-09-25 14:21
Completely agree. The |
From @lydell on 2016-09-25 14:41 I think we should not implement any new features whatsoever until the more important issues are "done":
Also, in my opinion, discussions on new stuff makes it harder to find the important stuff in this repo. But that’s just what I think. |
From @GeoffreyBooth on 2016-09-25 17:04 Agreed @lydell, but people with their pet feature can just submit a pull request that tries to add it. Features like #4144. Are such PRs just going to sit open and unmerged until 2.0.0-final is out the door? Or indefinitely, until a maintainer expresses enough interest to actually check the PR for bugs? Speaking of which, there are 36 open PRs, many of which are years old. I feel like we should clear this backlog. What’s a reasonable way to do so? I don’t feel comfortable closing pull requests unilaterally. We could make this repo the official place for “discussion” issues, to slim down the number of open issues/PRs on the main repo. |
From @DomVinyard on 2016-09-26 08:55 Sugars are great where they make sense, but the fact that we desugared
|
From @Asc2011 on 2016-09-26 12:44 So the TC39-folks have framed us with
Regarding the So there is no shortage on ideas for re-naming and rebranding common stuff. It is not easy to avoid a defensive-position, by either waiting on or adopting the ideas of TC39. |
From @tosadvisor on 2017-04-14 16:21 I've been using I'd also suggest allowing optional +1 for the existential operator, that thing is a lifesaver. |
From @lydell on 2017-04-15 15:27 @tosadvisor I think you're looking for the |
From @GeoffreyBooth on 2016-09-24 20:22
How do we feel about potentially adding new sugar features at this point? By “sugar” I mean a feature like
?
that has no corollary in JavaScript, that CoffeeScript provides as a shorthand to make it easier to type a complicated JavaScript construction (like=>
andclass
were when they were created). If there’s a better/more proper name for such features than “sugar,” please enlighten me.We have two recent proposals, #4144 and coffeescript6/discuss#39, concerning new operators that are sugars. Regardless of their specific merits, how do we feel about such proposals in general? I almost feel like we should take a position of “no more sugars,” period, as a way to avoid future cases like
class
or...
where ECMAScript adopts our feature but then implements it in a different way. The pipe operator, in particular, is already a debated proposal in ECMAScript; I feel like adopting it in CoffeeScript before it exists in ECMAScript (if it ever appears in ECMAScript) could just set us up for trouble down the road when their implementation differs from ours.Sugars made sense when JavaScript was static and unchanging. But now that it’s a moving target, I wonder if CoffeeScript should still be trying to innovate new language features. It sucks, I know, to make us dependent on ECMAScript for innovation and close off our community’s creativity; especially since we’re the ones who came up with many of ES2015’s best features, like
=>
. But do we want to continue to play that role, if it means potentially more breaking changes in the future?The text was updated successfully, but these errors were encountered: