𝗧𝗵𝗲 𝗟𝗮𝘄 𝗼𝗳 𝗟𝗲𝗮𝗸𝘆 𝗔𝗯𝘀𝘁𝗿𝗮𝗰𝘁𝗶𝗼𝗻𝘀 𝗶𝗻 𝗔𝗻𝗴𝘂𝗹𝗮𝗿

Angular provides high levels of abstraction. Tools like the Router, HttpClient, and Signals hide the complexity of the browser and the JavaScript runtime.

This convenience follows a principle called the Law of Leaky Abstractions.

This law states: All non-trivial abstractions leak.

An abstraction hides complexity. It does not remove it.

Consider these examples:

  • Signals manage state simply. They hide how rendering happens.
  • HttpClient handles web requests easily.
  • RxJS manages data streams with operators.

The leak happens when things break.

When you face a CORS error or a timeout, you must understand HTTP and network protocols. The HttpClient abstraction fails to hide those details.

When you struggle to choose between switchMap and mergeMap, you must understand the JavaScript event loop. RxJS cannot hide how the system schedules work.

AI-powered tools are the newest layer of abstraction. You use AI to write components, tests, and features. This makes you faster.

But the law applies to AI too.

When AI code fails or creates security risks, you must understand the underlying code. AI does not replace your knowledge of TypeScript, browsers, or architecture.

The more you rely on AI, the more you need fundamentals. You must evaluate the quality of what the AI produces.

Senior engineers stand out because they know what lies beneath the surface. They find the root cause when abstractions fail.

Angular makes you productive. AI makes you fast. Neither makes networking, the DOM, or basic engineering optional.

They only make it easy to forget the fundamentals until something breaks.

Source: https://dev.to/duskoperic/the-law-of-leaky-abstractions-in-the-angular-ecosystem-59da