What's Unscalable about JavaScript? | TypeScript OOP
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.
- Performance scalability
- 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.
Discussion
Liked this? Sing it loud and proud π¨βπ€.
Stay in touch!
We're just getting started π₯ Interested in how to write professional JavaScript and TypeScript? Join 8000+ other developers learning about Domain-Driven Design and Enterprise Node.js. I won't spam ya. π Unsubscribe anytime.
View more in TypeScript

You may also enjoy...
A few more related articles




Trending Content
Software Design and Architecture is pretty much its own field of study within the realm of computing, like DevOps or UX Design. Here's a map describing the breadth of software design and architecture, from clean code to microkernels.
Learn how to use DDD and object-oriented programming concepts to model complex Node.js backends.
Want to be notified when new content comes out?
Join 8000+ other developers learning about Domain-Driven Design and Enterprise Node.js.
I won't spam ya. π Unsubscribe anytime.
0 Comments
Be the first to leave a comment