Report this

What is the reason for this report?

Have you ever used abstraction for hiding complexity?

Posted on July 1, 2025
Faizan Younas Tanooli

By Faizan Younas Tanooli

.Net Developer

Connected Tutorial(This question is a follow-up to this tutorial):

What is Abstraction in OOPS?

In object-oriented programming, abstraction is often defined as “hiding internal complexity and exposing only essential features.”

But in real-world software development, we mostly use abstraction to:

  • Define a common base class or interface, and

  • Allow different implementations to be used interchangeably via that common contract.

For example, I might have a PaymentProcessor interface that both StripeProcessor and PayPalProcessor implement — so my code can depend on the abstract PaymentProcessor, not the specific implementation.

But here, I’m not really “hiding complexity” in the sense that the main goal is not to simplify the interface for an end user — it’s to make the system extensible and loosely coupled.

So my question is:

Shouldn’t we define abstraction more in terms of creating common interfaces for interchangeable behavior, rather than just “hiding complexity”?

Or — is “hiding complexity” still the right definition, but just a broader one that includes these use cases?



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hi there,

You’re still hiding complexity, just at a different level.

When you use an interface like PaymentProcessor, you’re keeping the rest of your code from caring how Stripe or PayPal actually works.

That’s the whole point of abstraction. It’s not just about simplifying things for users, but also about keeping systems flexible and decoupled.

So yeah, “hiding complexity” still fits, it just applies in a broader sense than most tutorials explain.

- Bobby

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.