Search code examples
abstractionsolid-principles

What is Trivial Abstraction (Leaky abstraction Context)


I was reading an article of Leaky Abstraction Law and I read something saying

All non-trivial abstractions, to some degree, are leaky.

So what does Trivial abstraction means ?

Thank you.


Solution

  • The word trivial is used for its common dictionary definition. It has nothing to do with C++ (or mathematics).

    Trivial

    • of little value or importance.
    • synonyms: unimportant, insignificant, inconsequential, minor.

    In programming the word toy is often used to describe trivial applications, as in the phrase a toy program. In this case a trivial abstraction would be a toy abstraction, used for demonstration purposes only: not real or practical.