• addie@feddit.uk
    link
    fedilink
    arrow-up
    9
    arrow-down
    1
    ·
    2 hours ago

    Abstraction is not very compatible with concurrency, so as well as your your beautiful abstract API, you also need some ‘cut through the layers’ functions to return the underlying classes you need to synchronise on. Now you have a right mess that’s incredibly hard to understand, infuriating to debug, and impossible to refactor. Best you can do is put another layer of abstraction on top. Repeat every six months.

    • 3abas@lemmy.world
      link
      fedilink
      arrow-up
      2
      ·
      6 minutes ago

      That’s just bad interface… When you design an API as if operations were independent, but they aren’t, you run into these issues.

      Don’t add “cut through the lawyers” functions, fix your interface.