What's Unscalable about JavaScript? | TypeScript OOP

Last updated Aug 21st, 2019
TypeScript is called JavaScript that scales. What's so unscalable about JavaScript?

Microsoft called TypeScript JavaScript that scales... what's so unscalable about JavaScript?

With respect to software development, there are two ways to think about scalability.

  1. Performance scalability
  2. Productivity scalability

TypeScript is meant to address 2. Productivity scalability.

Like most dynamically-typed languages, the lack of types in JavaScript can drastically improve initial productivity levels on certain projects, but there are factors that exist in other projects (team size, code size, intended code lifespan, domain complexity), in which the lack of types can be detrimental to code quality and understandability.

It's been agreed upon that:

  • It's better enable the compiler to catch silly bugs, typos, and other errors at compile time, rather than in production at runtime.
  • Tests are the best documentation possible for your code. Types are no substitute for writing tests, but they can do a good job at reducing the surface area of bugs.
  • Tests also enable faster and safer refactoring. Similarly, if no tests exist, types can (at the very least) catch syntatic inaccuracies.

We've talked about it previously, but TypeScript addresses #3 of the Hard Software Problems: The Compled Domain Problem.

See also: "When to Use TypeScript", a Detailed Guide through Common Scenarios.


Liked this? Sing it loud and proud 👨‍🎤.

Stay in touch!

About the author

Khalil Stemmler,
Software Essentialist ⚡

I'm Khalil. I turn code-first developers into confident crafters without having to buy, read & digest hundreds of complex programming books. Using Software Essentialism, my philosophy of software design, I coach developers through boredom, impostor syndrome, and a lack of direction to master software design and architecture. Mastery though, is not the end goal. It is merely a step towards your Inward Pull.

View more in TypeScript

You may also enjoy...

A few more related articles

Books that Developers Should Read in 2020 [List]
These books “are basically cheat codes” for leveling up your skills and knowledge as a developer.
How to Handle Updates on Aggregates - Domain-Driven Design w/ TypeScript
In this article, you'll learn approaches for handling aggregates on Aggregates in Domain-Driven Design.
Decoupling Logic with Domain Events [Guide] - Domain-Driven Design w/ TypeScript
In this article, we'll walk through the process of using Domain Events to clean up how we decouple complex domain logic across the...
Does DDD Belong on the Frontend? - Domain-Driven Design w/ TypeScript
Should we utilize Domain-Driven Design principles and patterns in front-end applications? How far does domain modeling reach from ...