TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Civet: The CoffeeScript of TypeScript

20 pointsby Yahivinover 2 years ago

5 comments

DanielHBover 2 years ago
coffeescript fell out of use because ES6 brought like 90% of the benefits of cofeescript and added a few more things. One of the few things that coffeescript still had going for it was the different syntax that a lot of people like (identation-based blocks, no curly braces, etc)<p>As always pragmatism won and ES6 thrived, but Coffeescript still had a few things that ES6 didn&#x27;t have. My favourite feature is &quot;everything is an expression&quot; so you can do something like this:<p>eldest = if 24 &gt; 21 then &quot;Liz&quot; else &quot;Ike&quot;<p>see: <a href="http:&#x2F;&#x2F;coffeescript.org&#x2F;#expressions" rel="nofollow">http:&#x2F;&#x2F;coffeescript.org&#x2F;#expressions</a><p>this comes from Lisp and makes a lot of things easier. Obviously this was not implemented in ES6 because it would break compatibility and there is also some problems with implicit returns that made the feature a bit weird<p>I wonder if a syntax like this for JS would work:<p>const eldest = if (24&gt;41) { escape &quot;Liz&quot; } else { escape &quot;Ike&quot; }<p>with &quot;escape&quot; working like a mix of &quot;break&quot; and &quot;return&quot;. But even then this is likely to cause incompatibilities
评论 #33328849 未加载
评论 #33339267 未加载
NoahTheDukeover 2 years ago
&gt; don&#x27;t mix and match words and symbols<p>This is an interesting design decision. Why don’t you want to combine them?
评论 #33339207 未加载
lgasover 2 years ago
Amazing name.
评论 #33326061 未加载
Yahivinover 2 years ago
I created this new transpiled language to bridge the gap between CoffeeScript and TypeScript. It&#x27;s getting really good these days!
评论 #33338798 未加载
评论 #33330794 未加载
评论 #33325214 未加载
solardevover 2 years ago
What is CoffeeScript and why would you use it in conjunction with TypeScript?
评论 #33325177 未加载