pekko icon indicating copy to clipboard operation
pekko copied to clipboard

Confusing sentence in Design Principles docs

Open InmanCochrane opened this issue 11 months ago • 1 comments

I know this is trivial, and 7 years old from the Akka fork, but I was perplexed by this sentence in the Design Principles page: https://github.com/apache/pekko/blob/2469f729f7503acf814bcbd042b4bb0863103c9d/docs/src/main/paradox/general/stream/stream-design.md?plain=1#L56

I tried to parse my way through,

can
  with certainty
    it can't
      really be that X
        can be considered
          P or
          Q

and think I've landed on a qualifier-free simplification of, "A direct inheritance relationship with these types cannot be considered some sort of advantage nor meaningful differentiator between libraries."

Is that what this is trying to say? I acknowledge that qualifiers can be important, so that's why I'm not submitting a PR to use that new text, but I'm suggesting that someone who understands this better try to rephrase that sentence or paragraph so that it's easier to follow.

InmanCochrane avatar Jan 22 '25 20:01 InmanCochrane

Yes, I think you understood it correctly - this is further confirmed by the next sentence

Rather, it could be seen that APIs which expose those SPI types to end-users are leaking internal implementation details accidentally.

I don't remember the history, but I think there were some other implementations that were marketing themselves as supporting Reactive Streams "more natively" because they were directly extending those classes, which doesn't really make sense.

Perhaps we should make it a bit more direct, and replace those two lines with something like:

In other words, these classes are intended to be an internal detail of interoperable libraries. While some other libraries expose the SPI types directly to end users, for example by inheriting from them, you could say this leaks an internal implementation detail.

raboof avatar Jan 27 '25 13:01 raboof