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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Ask HN: Will TS move from 'opt-in' to 'required' for all JavaScript development?

1 点作者 okhuman超过 4 年前
It would be in Microsoft&#x27;s best interest for TS to move from &#x27;opt-in&#x27; to &#x27;required&#x27; for all JS development. JS roadmap development would effectively be centralized with Microsoft.<p>Maybe this is not the intent of the TS team specifically but, from a corporate level, if you were the gate keeper for all JS development, that would be an immensely profitable outcome.<p>It wouldn&#x27;t even be that hard for Microsoft to do so. Just extend JS development with great new features (innovate quickly) to the point where it no longer makes sense for the average JS developer to build without it.<p>Making it only a matter of time, to achieve ownership of the scripting language.<p>This future is no doubt an interesting one.

1 comment

jfengel超过 4 年前
If you could change Javascript, you would stop using Javascript.<p>Typescript is, at last, a pretty good language. Not a great one, but a pretty good one. You wouldn&#x27;t really look twice at it, except that it&#x27;s easily able to run on web browsers, the critical niche for Javascript. And it&#x27;s easily compatible with the vast numbers of existing Javascript libraries, which have become indispensible for making web apps practical.<p>Javascript has a lock on that domain. You can&#x27;t really program web apps without Javascript. Even if you compile to Javascript, you can&#x27;t make that process completely opaque. You will have to deal with libraries and debugging tools built around Javascript.<p>A superhuman effort has made it possible to slowly upgrade Javascript, so long as it&#x27;s all very backwards compatible. Even Typescript has vast numbers of Javascript warts in it which nobody would consider good langauge design. They exist because it&#x27;s all just a thin gloss on Javascript.<p>If you could break that notion of backwards compatibility, you wouldn&#x27;t pick Typescript. Anybody with the power to force Typescript would force something different instead. Indeed, Microsoft is doing that, by nudging forward with WebAssembly, which may ultimately supplant JavaScript as the target language, allowing much better languages to jockey for dominance.<p>Meantime, many teams will be wise to pick TS as the least-worst language for web apps, and maybe even dejectedly pick Node for the server side and Electron&#x2F;ReactNative for your mobile apps so that the can all share code. As bad as JS is, that browser lock is a commanding height. TS makes that fact less grim, but it relies on JS&#x27;s death grip on the browser. There&#x27;s no way for JS to take that over without displacing so much existing code that you might as well target Haskell.