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.

TypeScript Won

121 pointsby SanderMakabout 9 years ago

28 comments

knowtheoryabout 9 years ago
I could quibble with the conflation of correlation w&#x2F; causation for a lot of the comments this post makes about es6&#x2F;babel or coffeescript.<p>But each time i re-read this post, the cohesive point that pops out most is that this post is basically a Donald Trump speech about Typescript.<p>The claim is that it&#x27;s bigger, it&#x27;s better, and everyone else is a bit sad. It disingenuously claims that it&#x27;s not about about competition and then <i>literally ends with</i> &quot;Typescript Won&quot;.<p>So, lemme offer some rhetorical advice:<p>1) pick to a POV &amp; stick to it. It&#x27;s a competition or it&#x27;s not. You either think it&#x27;s worth highlighting how much better Typescript is over other technologies, or you don&#x27;t.<p>2) Most of the points made in the post aren&#x27;t assertions about the benefits of Typescript or the decisions it makes. Not everyone agrees that the existence of a static type checker is an unqualified benefit (and there are many dimensions to that conversation). If you want to make the assertion that Typescript makes your life easier&#x2F;better <i>because it has a type checker</i>, assert the benefits of having a type checker (and the decision making for AngularJS&#x27;s adoption of Typescript on the basis of having a type checker could use a citation).<p>3) Related to 1., this post comes off as MEGA passive-aggressive because you keep on mentioning how much you also love other technologies <i>at the same time</i> talking about how they are inferior to Typescript on a variety of shifting bases. Because of that you&#x27;re not telling a cohesive story about Typescript. You&#x27;re just talking about how you think other technologies are bad.
评论 #11581278 未加载
评论 #11581992 未加载
评论 #11581857 未加载
评论 #11582017 未加载
thejameskyleabout 9 years ago
It&#x27;s frustrating that the only reason thats really given for TypeScript being &quot;better&quot; than Babel is that it has more downloads, using incorrect charts to prove it.<p>Here&#x27;s the actual download charts if you are interested: <a href="https:&#x2F;&#x2F;twitter.com&#x2F;thejameskyle&#x2F;status&#x2F;725344218411986946" rel="nofollow">https:&#x2F;&#x2F;twitter.com&#x2F;thejameskyle&#x2F;status&#x2F;725344218411986946</a><p>Source: - babel-core: <a href="http:&#x2F;&#x2F;npm-stat.com&#x2F;charts.html?package=babel-core&amp;author=&amp;from=2015-04-28&amp;to=2016-04-27" rel="nofollow">http:&#x2F;&#x2F;npm-stat.com&#x2F;charts.html?package=babel-core&amp;author=&amp;f...</a> - typescript: <a href="http:&#x2F;&#x2F;npm-stat.com&#x2F;charts.html?package=typescript&amp;author=&amp;from=2015-04-28&amp;to=2016-04-27" rel="nofollow">http:&#x2F;&#x2F;npm-stat.com&#x2F;charts.html?package=typescript&amp;author=&amp;f...</a><p>Also if you want types with Babel, use Flow– which is arguably a much better type system anyways.
评论 #11581472 未加载
评论 #11581593 未加载
评论 #11581488 未加载
评论 #11583407 未加载
评论 #11581662 未加载
antjanusabout 9 years ago
One thing that makes a huge difference is the plugin ecosystem. TypeScript, as far as I know, doesn&#x27;t have any while Babel has a whole myriad of them by various people.<p>I recently built a Babel plugin that solves a lot of my module import pathing issues (namely the `..&#x2F;..&#x2F;` hell)<p><a href="https:&#x2F;&#x2F;github.com&#x2F;AntJanus&#x2F;babel-plugin-namespaces" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;AntJanus&#x2F;babel-plugin-namespaces</a><p>This and other plugins are just not possible on TS. The best way to look at Babel vs TypeScript is to realize they do different things. As far as Babel ES2015 transpiling vs TypeScript, maybe TS wins out. But Babel is a whole platform for transpiling. In fact, you can use both Babel and TypeScript together!
koolbaabout 9 years ago
Does anyone here have <i>bad</i> things to say about TypeScript?<p>I haven&#x27;t used it for any large projects yet (couple toy ones) but seems pretty legit. Based on my anecdata, people who have used it at scale seems to like it.<p>I can&#x27;t tell if that&#x27;s because they&#x27;re still in the honeymoon phase or if it really is a step forward for the long term.
评论 #11580865 未加载
评论 #11580880 未加载
评论 #11581090 未加载
评论 #11580980 未加载
评论 #11580924 未加载
评论 #11580930 未加载
评论 #11580918 未加载
评论 #11581973 未加载
评论 #11580993 未加载
评论 #11581259 未加载
评论 #11582124 未加载
评论 #11580921 未加载
评论 #11580952 未加载
评论 #11581223 未加载
symlinkkabout 9 years ago
I bet we&#x27;ll be seeing a lot more of Typescript in the next few years, seeing as it&#x27;s the default language that is suggested in Angular 2&#x27;s documentation. I find it odd that Dart wasn&#x27;t the default language of choice for Angular 2 (although it is fully supported) seeing as Google is behind both projects. I think it really boils down to what the author wrote here: &quot;Dart is not JavaScript. TypeScript is.&quot; At the end of the day more people are going to want to use what they are already more familiar with, and it&#x27;s really not necessary to throw out years and years of progress we have made on JS.
评论 #11581150 未加载
jwinemanabout 9 years ago
Interesting he omits Flow from his very carefully chosen &quot;Typescript won&quot; arguments.
评论 #11580926 未加载
评论 #11581490 未加载
评论 #11582596 未加载
gkilmainabout 9 years ago
What have they won? Why all of the f&#x27;ing if you choose A you&#x27;re awesome if you choose B you&#x27;ve lost? Articles like this give me anxiety.
评论 #11580894 未加载
评论 #11580872 未加载
superskierpatabout 9 years ago
On the topic of typescript vs purescript and similar projects, I believe these projects are more for people who want to stay in the same mindset across the whole stack. So haskell with ghjs or purescript and scala with scalajs... I dont think they are really in competition with typescript.
评论 #11581891 未加载
yesimahumanabout 9 years ago
No need to say TypeScript &quot;won,&quot; we&#x27;re all pushing JS forward and TS is just another tool in the toolbox. However, I&#x27;m glad to see it doing well especially since it felt like a big risk for us at Ionic to pick TypeScript (along with ng2). I&#x27;ve been happy with how positively received TS has been, which has been a bit of a surprise to me, honestly.
LukeB_UKabout 9 years ago
I think the end result is actually that JavaScript wins. If it turns out that a lot of people think that JavaScript needs a type system, one will be proposed and rolled into the language.
tptacekabout 9 years ago
Is Typescript&#x2F;Babel an either&#x2F;or choice?<p>ES6 is non-negotiable. I understand the basic premise behind Typescript. Would I &quot;switch&quot; from Babel to Typescript and get arrow functions and string interpolation through Typescript somehow?
评论 #11581100 未加载
评论 #11581126 未加载
drinchevabout 9 years ago
Wow this is such a strong title. There&#x27;s no winning. Use the right tool for the right job.<p>Although every big project I take these days I prefer to write in TypeScript, I would honestly not use it if I have a small static landing page with an AJAX ticker or something. It would be overkill.
davidhydeabout 9 years ago
TypeScript on JavaScript is like c# on CIL (.net common intermediate language). You are free to modernize the language as much as you want without breaking backwards compatibility. Not surprising Anders Hejlsberg is heavily involved in both. Great language.
PSeitzabout 9 years ago
Once ES6 is widely supported, and a transpiler is not necessary anymore, people will switch to pure ES6.
JustSomeNobodyabout 9 years ago
I hate these stupid &quot;X Won&quot; posts.
rhinoceraptorabout 9 years ago
Or it could be that Babel downloads are declining because it&#x27;s becoming less necessary as Node and the major browsers implement ES6.<p>The whole point of Babel is to be a stopgap, so it&#x27;s not surprising that its usage is declining. Babel is not a language.
Toucheabout 9 years ago
Weird comparisons. People who like Elm aren&#x27;t going to switch to TypeScript because it&#x27;s more popular. They are fundamental disagreements that can&#x27;t be dismissed with a Google Trend chart.<p>TypeScript is currently popular but popularity in JavaScript never last long. The cycle is:<p>* A library that comes out that solves a problem with the previous iteration.<p>* The new popular library has some different problem but people ignore it because the new cool thing is still fresh in their minds.<p>* People become annoyed with the popular library and someone makes a new library that fixes the problem with the popular library. It looks a lot like the original library that popular library replaced.<p>* Cycle repeats itself.
评论 #11582210 未加载
kowdermeisterabout 9 years ago
If I absolutely must choose a &quot;winner&quot; (what does that even mean?) then I would give the golden medal to the one that has a standard behind it.<p>I think it&#x27;s a very pointless thing to pick a winner. It&#x27;s not a popularity contest. You will be able to tell that some technology is &quot;lost&quot; or is over, when the popularity will be declined to the 0.0.1 alpha release state.
评论 #11582341 未加载
quangvabout 9 years ago
Doesn&#x27;t matter, it maybe more popular, but it no one died.<p><a href="http:&#x2F;&#x2F;zenoverflow.com&#x2F;2016&#x2F;04&#x2F;27&#x2F;platform-of-the-browser&#x2F;" rel="nofollow">http:&#x2F;&#x2F;zenoverflow.com&#x2F;2016&#x2F;04&#x2F;27&#x2F;platform-of-the-browser&#x2F;</a> - my response to TypeScript Winning
shruggerabout 9 years ago
I love the piegonhole arguments that always &#x27;exclude&#x27; Dart from these types of discussions.<p>Class-based vs prototype-based, classes will always win. JS is terrible, TypeScript is only very slightly better.<p>Dart&#x27;s core team is absolutely world class, and the language is already highly capable.
评论 #11582404 未加载
noahltabout 9 years ago
What about Flow?
untogabout 9 years ago
Choosing a winner based on Google Trends?<p>Hmm.<p>Pointing out that CoffeeScript is on the decline because Google Trends for it once peaked and has since declined?<p>Hmm.<p>Failing to consider that TypeScript might be at a similar peak and is due a similar decline?<p>Hmm.
评论 #11582307 未加载
gcb0about 9 years ago
... won the disposable syntax sugar of the month.<p>next month people will want memory protection in JavaScript and JavaScript developers being JavaScript developers will create a new project from scratch with new syntax, just like Babel did from coffee and like typescript did from Babel.<p>meh.<p>this is all needed because you have a team that doesn&#x27;t know how to agree on coding style or something. yes, it would be nice to have type errors detected before runtime. but we have responsive devs so we never had those errors to begin with. and we&#x27;re way past 80k lines. adding a transpiler would be more annoying than helpful.
评论 #11581471 未加载
draw_downabout 9 years ago
I&#x27;ll keep writing in the language it compiles down to. Which would be JavaScript, of course. But keep telling yourselves that if you must...
coroutinesabout 9 years ago
TypeScript &quot;won&quot; because certain folks will happily trade some coherency for more complexity.<p>Types (can) be helpful.
intrasightabout 9 years ago
JavaScript as an intermediate language is a fail, therefore TypeScript is a fail.
deforciantabout 9 years ago
javascript and &quot;win&quot; must not be in the same sentence
评论 #11581220 未加载
hiouabout 9 years ago
If you like typescript so much you might as well stop pretending you write JavaScript and just write in C# like you really want to.<p><a href="http:&#x2F;&#x2F;bridge.net" rel="nofollow">http:&#x2F;&#x2F;bridge.net</a><p>If typescript was simply type safety that would be one thing. It&#x27;s definitely a lot, lot more than that.<p>Typescript is to .NET as Coffeescript was to Ruby. A bunch of developers who didn&#x27;t know JavaScript and wanted to find the closest thing they could to what they already knew. And who really uses Coffeescript anymore? Stick with esnext to babel and the bright future JavaScript has ahead.
评论 #11581297 未加载