18 ms·
Typescript is hardly "new", it's fairly widely accepted now. It might be worth thinking "why do all these people enjoy using Typescript?". or idk just say that
by madeofpalk 6y ago
Typescript is hardly "new", it's fairly widely accepted now. It might be worth thinking "why do all these people enjoy using Typescript?".
or idk just say that no, its the kids that are wrong.
- gameswithgo 6y agoAll the kids enjoyed using Javascript too. Language popularity is a bit of a random walk.
- ForHackernews 6y agoI mean, Coffeescript was fairly widely used at its peak, and now it's all but dead. Front-end fads are fickle. At least TypeScript has Microsoft backing it so they'll likely continue to support even if the rest of the webdev world moves on to the next shiny object.
- scrollaway 6y agoI don't think I've ever heard of any in-production, large apps in Coffeescript, even from when it was at its peak. I know of a handful of companies that tried it and even enjoyed it quite a bit but none of it was for mass consumption. Typescript, meanwhile, is used for hugely popular apps, is used by very large companies, has Microsoft's full backing, etc. The two are not comparable. Edit: Clearly I'm misremembering its popularity.
- ForHackernews 6y agoAt one time, Dropbox and Github were all-in on Coffeescript e.g. https://web.archive.org/web/20130815075924/https://github.com/styleguide/javascript https://web.archive.org/web/20130815075924/https://github.co...
- ChrisLTD 6y agoWasn’t CoffeeScript the preferred way to write JS in Ruby on Rails for years?
- scrose 6y agoI think the Rails resource generators still default to creating Coffeescript files. I could be wrong though — I switch between Rails 4,5 and 6 projects right now. I’ve been on over a dozen Rails projects at different companies and only ever worked one project that used Coffeescript in production, and that was an app built pre-2010.
- nullserver 6y agoHAML and coffeescript.
- aendruk 6y agoI miss the elegance of Haml. Moving from an indented syntax for DOM literals to the likes of JSX felt like a step backwards.
- scrollaway 6y agoMaybe for you, but that is not a popular opinion. JSX's rigor is a breath of fresh air in a world that constantly generates low quality html due to loose constraints. HAML had those same problems. JSX is kind of xml done "right". Differences between children and attributes in xml is very hard to grasp, but JSX has a much better defined structure to it and is super well suited to generate html because of that.
- aendruk 6y agoThis sounds like an orthogonal point. (I agree with it, so it feels odd to see it presented as a rebuttal.) Surely an indented syntax could have rigor if we wanted it to?
- scrollaway 6y agoSure, if we wanted it to, but HAML wasn't that.
- jitl 6y agoA significant portion of Airbnb was written in Coffeescript, including most of the complex app-like stuff used by hosts to manage listings and calendars. We ported off of Coffeescript when ES6 and Babel came out, and you could start writing `class` and using `() => {...}` function expressions with lexical `this` scoping. Coffeescript lost because it stood still next to the ecosystem and next to the new Ecmascript language standards, which obliviated its advantages. The only advantage Coffeescript had over ES6 was “some of your code is already written in it”. Once Ecmascript formalizes a type system, we’ll see the same process happen with Typescript. But, I think it will be many years before that sort of feature is standardized. In the mean time, I’m happy to use Typescript today.
- akavi 6y agoPagerDuty’s front end was 100% coffeescript until at least 2016
- bananabreakfast 6y agoSquare's entire merchant dashboard was in CoffeeScript. Half a million lines of code. Took over a year to convert to ES6.
- tenaciousDaniel 6y agoI also have fond memories of painstakingly converting hundreds of coffeescript files back to JS. There's something to be said for using the native language.
- nullserver 6y agoBrowser support and consistency got a lot better. JavaScript was a minefield of compatibility problems. Many intentional, cough: Microsoft. Jquery was awesome because it dealt with most of that
- recursive 6y agoJQuery dealt with DOM and browser stuff. Coffeescript dealt with syntactic language stuff. I can't think of a case where Coffeescript helps with the same thing JQuery does, although it may exist.
- tenaciousDaniel 6y agoYeah as best I can tell, Coffeescript was a thing because Ruby was very popular at the time, and some Ruby devs had to write JS but they wanted to write Ruby.
- ForHackernews 6y agoI think everyone except JS devs wishes they could write something other than JS for the browser. Maybe eventually with WebAssembly...
- WorldMaker 6y agoThat was definitely the case before ES2015. I think many of the non-JS devs that still hugely wish they could write something other than JS for the browser haven't kept up with ES2015+ nor Typescript. ES2015 is a much improved language and vanilla JS isn't painful anymore, especially with type="module" support now green enough in caniuse statistics that we can finally kill AMD and CommonJS for good in greenfield vanilla JS projects. The sky is quite sunny and ES2015+ is a better language than a lot of non-JS devs think JS is. It will still be a while before all the brownfields in the larger ecosystem get cleaned up (if some of them ever do), but that's no longer a language problem, that's a a long tail ecosystem problem.
- specialp 6y agoCoffeescript was a good thing when we only had ES5. In fact many of the things it championed made it into ES6 and beyond. I think with TypeScript it isn't just a shiny thing. If it does substantially change I believe it will be to break the forced compat with JS. As WebAssembly gets more adopted it will be possible to not have JS targets, and thus remove a lot of the weird JS things that have been kept for compatibility. Typescript has the gravity to continue.
- mixedCase 6y agoCoffeeScript served a purpose, and was not a fad. It got deprecated by an ECMAScript that adapted most of the good parts. TypeScript brought something good for the JS ecosystem (although Flow did it too, in a different way) and it doesn't look like anything will be able to replace it at what it does anytime soon.
- runarberg 6y agoI am really hoping TC-39 starts considering optional static types (similar to python), using a simpler syntax then TypeScript (e.g. no enums). However I don’t have high hopes they will any time soon.
- baybal2 6y agoTypescript is not accepted. How AngularJS stuck on 1.* is the best proof, and an illustration for the problem. Pretty serious people are working in Angular community, it's immensely popular in the enterprise webapp space, so I will not take the "Ah, it's just amateurs who are stuck there." It adds to countless attempts of other transpiled *scripts to extend Javascript. They, and Coffeescript in particular, are good historical references to what will happen to TS in a few years.
- servercobra 6y agoI don't recall most major projects shipping with support for Coffeescript. Looking at my projects, the amount of "@types/*" I have are pretty small compared to a year or two ago because most projects ship types directly in their package now. Personally, I think it's here to stay.
- arcturus17 6y agoAbout 95% of React components I see in the wild are in TypeScript. The most rapidly growing JS backend framework (Nest) is in TS. Deno, the evolution of Node, is based on TS. Pretty much everything in the JavaScript OSS world has TS options or is based on TS. I doubt Coffeescript ever saw this scale of adoption.
- pjmlp 6y agoWe only use TypeScript on frameworks that make it a requirement, the language is starting to look like Haskell. As much as I like Anders work, it is impossible to understand modern TypeScript without looking into tsconfig.json before looking into source code.
- zaccusl 6y agoI don't understand what the tsconfig has to do with understanding the source? Maybe when using different path resolving or different tsconfigs to compile test files vs. production files? Many toolings make it so you don't even need to worry about the tsconfig anymore (though in reality it is very helpful to understand it).
- airza 6y agoI myself am quite fond of it actually! I was initially suspicious of Node at first and of TS as well, but like the author, I eventually gave it a try and liked it a lot. (Probably after many of the pain points had been worked out!)