[Reactive]: redundant ListState.Value overload? #1349
Replies: 1 comment 1 reply
-
The
Yes but as lot of theme have delegate as parameter, reducing the number of possible overloads greatly helps type inference for auto-completion.
The overloads that has a
Same, reducing the number of overloads to help type-inference and make it clearer to the user what he has to do. |
Beta Was this translation helpful? Give feedback.
-
ListState
offers several factory methods for creatingIListStates<T>
(as well asListFeed
), some of which have duplicate overloads for bothFunc<IImmutableList<T>>
(interface) andFunc<ImmutableList<T>>
(concrete), for example:uno.extensions/src/Uno.Extensions.Reactive/Core/ListState.cs
Lines 30 to 54 in 68b1506
What's the reson they both exist, can't we just have only the interface version?
In fact they could all be named
Create
as their overloads defer.There are other inconsistensies between the 4 factory classes, for example some don't provide a
Func<CancellationToken, ...
overload where some do only with one. Can you please explain?Another one - there are inconsistencies in
ListState
's extensions, for instanceUpdate
andUpdateAsync
can be both named justUpdate
as they're different overloads. AlsoAddAsync
and others.Beta Was this translation helpful? Give feedback.
All reactions