dotnet / reactive

The Reactive Extensions for .NET
http://reactivex.io
MIT License
6.67k stars 747 forks source link

Debounce incorrectly named throttle #1471

Open doctorpangloss opened 3 years ago

doctorpangloss commented 3 years ago

Bug

Which library version?

Latest

What are the platform(s), environment(s) and related component version(s)?

All

What is the use case or problem?

The Debounce is still called Throttle in System.Reactive, and the Throttle is somewhat achieved by sample (reopens https://github.com/dotnet/reactive/issues/395).

What is the expected outcome?

The names for these things should be how they are everywhere else.

What is the actual outcome?

For some reason, Debounce was called Throttle in C#.

Do you have a code snippet or project that reproduces the problem?

To a certain extent, elaborating on what debounce and throttle mean and do might only add confusion to this ticket as it did in the last. These snapshots from the documentation should illuminate the issue:

Capture

From Reactivex.io. Observe RxNET calls Throttle what is called in plurality Debounce.

Additionally, the behavior that is tested here is a debounce. It is similar to the tests in the Java implementation.

quinmars commented 3 years ago

For some reason, probably just a long ago error, Debounce was called Throttle in C#.

Given that the C# version is the first incarnation of the Rx pattern, one may argue who made the mistake here.

In the end, you are asking to break code that exists for many years. I am not convinced that your arguments are strong enough to justify those steps.

doctorpangloss commented 3 years ago

I removed that part. I don't know if it's an error or not, or when, or who made what.

Maybe instead of breaking code, the library gets an operator named Debounce that does the debounce behavior.

CodingOctocat commented 1 year ago

In 2023, Debounce and Throttle are still in disarray

ShadowMarker789 commented 5 months ago

And in 2024, I had an interesting discussion where I couldn't believe that these methods are still named wrong.

Backwards compatibility, huh. Simultaneously a blessing and a curse.