rxjs icon indicating copy to clipboard operation
rxjs copied to clipboard

Rename window to windowWith

Open benlesh opened this issue 5 years ago • 5 comments

We need to deprecate window, because it was a really dumb name, and rename it to windowWith or the like. I suggest windowWith just out of the spirit of concatWith and mergeWith renames... But I'm open to suggestions.

Related: https://github.com/ReactiveX/rxjs/issues/3788

benlesh avatar Feb 06 '20 01:02 benlesh

Similarly, we might want to rename buffer to bufferWith because they're closely related.

benlesh avatar Feb 06 '20 01:02 benlesh

Is there a concept for a counter part? if 'With' is used to relate to a operator. E. g. mergeWith. merge would be the counter part. this obviously doesn't work for window.

The real problem is the basenaming window.

I suggest take a new name. windows? slice? span?

BioPhoton avatar Mar 21 '20 23:03 BioPhoton

I don't even like the name I had here anymore.

Core Team Notes: Ben is dumb. This isn't a good name, and he shouldn't name things.

benlesh avatar Apr 21 '21 20:04 benlesh

Why not remove it? It appears to me that windowWhen does the same thing? Is there a difference other than typing?

raymonddavis avatar Jun 03 '21 20:06 raymonddavis

I would suggest either using partitionWith or sliceWith since I assume with is used to identify that this operation is with another observable emission. Partition already is used to make one stream into two based on some condition, partition could be used to partition it into multiple streams with the trigger being the emitting stream.

shees-usman avatar May 31 '22 08:05 shees-usman