DEV Community 👩‍💻👨‍💻

Cover image for Why (most) startups should only write TypeScript
Andrew Lee
Andrew Lee

Posted on

Why (most) startups should only write TypeScript

As an early engineer at a startup, you get to make the choice of what language to use. This is a big decision...choose TypeScript.

Before I go on further, there are some edge cases where this is not the case.

  1. You (or your team) have deep expertise in another language (i.e. Ruby, Go, etc.)

  2. You (or your team) are building specific technology with a dominant language (i.e. Python for machine learning)

  3. You (or your team) want to optimize for fun/happiness and another language provides that

Now that we got the edge cases out of the way, here is why (most) startups should only write TypeScript.

One language for frontend/backend/mobile

There are huge benefits to using one language for everything. We can share code and every engineer can be full stack.

JavaScript/TypeScript is the only language in the world that can be used to build a complex web frontend (i.e. React), backend (i.e. Express), and a mobile app (React Native).

In the early stages of the startup, it's all about finding product market fit as quick and efficiently as possible. We can choose to optimize each product if necessary (i.e. converting React Native to Swift) once the startup is mature.

Easy to recruit/onboard engineers

Advocates of obscure languages will claim choosing such a language will attract better engineers to the team. This may be true in the beginning, but costs soon outweigh the benefits as the startup scales.

Recruiting and onboarding engineers is hard enough, we shouldn't make it harder by choosing an obscure language. Everyone already knows TypeScript or can pick it up within a week because of its familiar syntax and robust community. There's also endless packages/libraries to speed up development.

Satisfies both static and dynamic type advocates

TypeScript provides just enough structure to satisfy static type advocates and just enough flexibility for dynamic type advocates. It's the happy medium that will prevent your team from looking for something else.

Conclusion

If you are in a situation to choose a language for a startup, make the pragmatic choice and go with TypeScript. If you go with any other language, the team might end up resenting you in the future.

Top comments (0)

Classic DEV Post from 2020:

js visualized

🚀⚙️ JavaScript Visualized: the JavaScript Engine

As JavaScript devs, we usually don't have to deal with compilers ourselves. However, it's definitely good to know the basics of the JavaScript engine and see how it handles our human-friendly JS code, and turns it into something machines understand! 🥳

Happy coding!