TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

How we failed, then succeeded, at migrating to TypeScript

69 点作者 drob超过 5 年前

6 条评论

AriaMinaei超过 5 年前
I was looking at some of my old repos today. Enjoyed the nostalgia. Lots of CoffeeScript there. I had to switch to ES and then TypeScript because CoffeeScript was abandoned at the time and I was stretched over other projects to be able to help maintain it.<p>Reading my old code, I was surprised by how <i>clean</i> it looks. How easy it is to digest. There is a certain sense of calm when your brain doesn&#x27;t have to process all the visual clutter of a C-style syntax. I miss that.<p>I wish I didn&#x27;t have to choose between CoffeeScript and TypeScript.<p>TypeScript first and foremost is about type safety and tooling. Its architecture is largely syntax-agnostic. It operates on the AST, so the parser and code generator can be swapped for a different syntax.<p>CoffeeScript is all about syntax and does not (and should not) concern itself with most of the semantics.<p>They could theoretically be used together if TypeScript simply allowed custom parsers&#x2F;generators&#x2F;formatters to be plugged in.<p>This would work with ESLint and other JS tooling as well. I did a POC on that a few years ago [0].<p>[0] <a href="https:&#x2F;&#x2F;github.com&#x2F;gkz&#x2F;LiveScript&#x2F;issues&#x2F;821#issuecomment-183640299" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;gkz&#x2F;LiveScript&#x2F;issues&#x2F;821#issuecomment-18...</a>
评论 #21242211 未加载
评论 #21242116 未加载
评论 #21243851 未加载
评论 #21242271 未加载
评论 #21243572 未加载
评论 #21243973 未加载
davidjnelson超过 5 年前
&gt; The most important realisation we had going into this renewed effort was that a successful migration has to be centered around people, not just tech.<p>Key insight. It’s always people first, code is a far distant second. Love Kent Beck’s series on this, so insightful <a href="https:&#x2F;&#x2F;medium.com&#x2F;@kentbeck_7670&#x2F;software-design-is-human-relationships-part-3-of-3-changers-changers-20eeac7846e0" rel="nofollow">https:&#x2F;&#x2F;medium.com&#x2F;@kentbeck_7670&#x2F;software-design-is-human-r...</a><p>Great read, Heap team! Thanks for sharing :-D
评论 #21245339 未加载
评论 #21244362 未加载
seieste超过 5 年前
Typescript seems to be approaching C++ levels of syntax and expressiveness. The main difference seems to be the existing tooling, tutorials, libraries, etc for node.js and others.<p>But if compiled languages like C++ or Go had as many dedicated libraries for webserver management as JavaScript, would there really be a benefit to using Typescript?
评论 #21243391 未加载
评论 #21242538 未加载
评论 #21242465 未加载
gingerlime超过 5 年前
We’re now considering switching from coffeescript to ES6 (or maybe also Typescript). But coffeescript is seeing a bit of a revival, and I’m starting to wonder if we should stick with it?? Tooling seems a bit behind and also lacking things like tree shaking etc (??). But coffeescript is so clean and fun...<p>Any tips&#x2F;thoughts??
评论 #21242314 未加载
评论 #21242612 未加载
评论 #21242360 未加载
评论 #21242391 未加载
评论 #21244285 未加载
RangerScience超过 5 年前
AFAIK, Ruby is the only language that people make other languages look like (CoffeeScript) and JS is the only language that people make look like other languages (CS, TS).<p>Are there others?<p>Edit: Well, I guess the JVM would be considered another?
评论 #21243834 未加载
Scarbutt超过 5 年前
<i>Yes, we were adding TypeScript code, but we were adding CoffeeScript at a faster rate</i><p>So the devs were able to iterate faster with CS than with TS?
评论 #21246223 未加载
评论 #21250457 未加载