rxjs-etc icon indicating copy to clipboard operation
rxjs-etc copied to clipboard

Selector Observable

Open spaceribs opened this issue 5 years ago • 4 comments

Hi,

I have a combiner I've been shopping around for the right place to contribute to, I didn't notice anything in your library which appeared to do the same, but this seems like the appropriate place for such a thing:

https://gist.github.com/spaceribs/738ec30dac2874d5ba9f7718208410e9

Please take a look and let me know if it makes sense to put up a pull request for this feature.

spaceribs avatar Oct 07 '20 11:10 spaceribs

Sorry, this slipped off my radar. I'll try to have a look at it later this week.

cartant avatar Oct 26 '20 07:10 cartant

That sounds reasonable, to me, but, IMO, it needs a better name. I think, selector too general and doesn't really convey what it does. I appreciate that naming things is hard. Given that it's close to onErrorResumeNext maybe something like onErrorResumeNextUntilComplete? IDK, that's pretty long. 😅 If you can come up with a name that's more descriptive than selector, I'm fine with adding it to the package.

Maybe onErrorContinue? IDK. Naming things is hard. 🤷‍♂️

cartant avatar Nov 09 '20 07:11 cartant

Agreed that selector isn't a good name, I just grabbed that from behavior tree nomenclature. Heres yours and my suggestions combined:

  1. onErrorContinue
  2. resumeUntilComplete
  3. percolate - i'm actually kind of a fan on this one. If you view the execution as a tree, then success is viewed on the ability of getting from the root to the leaves. If you already understand that basic algorithms exercise, that's exactly what this is doing.

let me know what you think of that last one, personally I like the idea of making it rather low level sounding because at least to me, percolates OR complements concats AND behavior

spaceribs avatar Nov 09 '20 16:11 spaceribs

I'm fine with percolate.

cartant avatar Nov 09 '20 21:11 cartant