CoffeeScript vs TypeScript: What are the differences?
CoffeeScript belongs to "Languages" category of the tech stack, while TypeScript can be primarily classified under "Templating Languages & Extensions".
CoffeeScript and TypeScript are both open source tools. TypeScript with 51.2K GitHub stars and 7.07K forks on GitHub appears to be more popular than CoffeeScript with 15.2K GitHub stars and 1.99K GitHub forks.
Slack, Asana, and Rainist are some of the popular companies that use TypeScript, whereas CoffeeScript is used by Typeform, Bukalapak, and thoughtbot. TypeScript has a broader approval, being mentioned in 982 company stacks & 1455 developers stacks; compared to CoffeeScript, which is listed in 364 company stacks and 170 developer stacks.
What is CoffeeScript?
What is TypeScript?
Need advice about which tool to choose?Ask the StackShare community!
Sign up to add, upvote and see more prosMake informed product decisions
Sign up to get full access to all the companiesMake informed product decisions
Sign up to get full access to all the tool integrationsMake informed product decisions
Choosing to add TypeScript has given us one more layer to rely on to help enforce code quality, good standards, and best practices within our engineering organization. One of the biggest benefits for us as an engineering team has been how well our IDEs and editors (e.g., Visual Studio Code ) integrate with and understand TypeScript . This allows developers to catch many more errors at development time instead of relying on run time. The end result is safer (from a type perspective) code and a more efficient coding experience that helps to catch and remove errors with less developer effort.
I use TypeScript for Web Applications and for both frontend and backend because it has a lot of tooling around it and they really got the types and type safety right. Flow (JS) on the other hand lacks tooling and most of the times I scramble to find the right way of building my contracts in which TypeScript is very intuitive and natural. Additionally TypeScript is very similar to Java so your backend engineers and full stack engineers can work with it without much of context switch.
The only time I think Flow shines is (based on probably my outdated knowledge) Flow is/was the only option if you want/wanted to build a React Native application mainly because React Native transpiler at the time I was working with it would only work with flow.
I use TypeScript because the tooling is more mature (the decision to discontinue TSLint in favor of moving all its checks to ESLint is a thoughtful and mature decision), there's a ton of examples and tutorials for it, and it just generally seems to be where the industry is headed. Flow (JS) is a fine tool, but it just hasn't seen the uptake that TS has, and as a result is lacking a lot of the nicer small things, like thorough Visual Studio Code integration, offered by TS.
We currently use TypeScript at work. Previously we used Flow (JS) but it was sometimes really difficult to make the types work the way you want. Especially non-trivial types were problematic. And the IDE support wasn't good, Flow took too much resources and sometimes remain stuck and do not show errors (I use Visual Studio Code). With TypeScript we almost do not have these problems. IDE support is superb, working with types is much easier and typing system seems more mature and powerful. There are some downsides (like partion inheritance etc.), but TS team is still pushing it forward. So for me TypeScript is clear winner.
I use TypeScript because it's adoption by many developers, it's supported by many companies, and it's growth. AngularJS, React, @ASP.NET Core. I started using it in .NET Core, then for a job. Later I added more Angular experience and wrote more React software. It makes your code easier to understand and read... which means it makes other people's code easier to understand and read.
I use TypeScript because:
- incredible developer tooling and community support
- actively developed and supported by Microsoft (yes, I like Microsoft) ;)
- easier to make sense of a TS codebase because the annotations provide so much more context than plain JS
- refactors become easier (VSCode has superb support for TS)
I've switched back and forth between TS and Flow and decided a year ago to abandon Flow completely in favor of TS. I don't want to bash Flow, however, my main grievances are very poor tooling (editor integration leaves much to be desired), a slower release cycle, and subpar docs and community support.
We have added very little to the CoffeeScript Hubot application – just enough to allow it to talk to our Hubot workers. The Hubot workers implement our operational management functionality and expose it to Hubot so we can get chat integration for free. We’ve also tailored the authentication and authorization code of Hubot to meet the needs of roles within our team.
For larger tasks, we’ve got an internal #CLI written in Go that talks to the same #API as Hubot, giving access to the same functionality we have in Slack, with the addition of scripting, piping, and all of our favorite #Unix tools. When the Hubot worker recognizes the CLI is in use, it logs the commands to Slack to maintain visibility of operational changes.
I think our #Frontend stack is pretty standard – but we have taken some deviations from a typical modern stack:
Yarn instead of npm. When yarn debuted, we never looked back. Now npm has pretty much caught up with speed and lockfiles, but yarn gives me confidence that my dependency installs are deterministic. Really interested in the plug-n-play (PnP) feature that removes the need for a node_modules folder, but haven't implemented this yet.
Typescript has been a win because, in general, it makes codebase maintenance less brittle. It's significantly easier to refactor in TS than JS, which encourages incremental improvements, file re-organizing, etc. Our developers are happier with the overall development experience.
The downside is that TS sometimes exacerbates problems caused by Node's fragmented ecosystem. Sometimes @types/
If your project is big enough, I'd say TS is nearly always worth it, but it can make selecting libraries a pain.
Used for Node.js personal projects that I think will have a longer lifetime than others, or that are combined with a web front end component like Angular (to share types).
Generally a poor developer experience. Usage decreasing recently compared to other preferred programming languages/platforms.
TypeScript is used in Kuro (https://github.com/Marc3842h/kuro).
Excellent design-time type checking and the ability for the Typescript compiler to attach typing information to metadata at compile time allows for relatively simple type checking at run-time as well.
We, our team can sleep comfortable at night know "x is undefined" will not occur in production. It's also really helpful as IDE help in code completion when they know types.
All front-end / back-end is driven by Coffeescript. For the main ReactJS functionality JSX is embedded with coffee in .cjsx files / handled by Browserify.
We like CoffeeScript because it's more readable, we use it because we have a lot of libraries and functions already (plays nicely with Rails, too)