3 ms·
While sprinkling a few expressions like this around is nice, it's quite a chore to embrace a true dataflow or similiar functionally typed design through your wh
by platz 13y ago
While sprinkling a few expressions like this around is nice, it's quite a chore to embrace a true dataflow or similiar functionally typed design through your whole application, because the types in c# are so verbose i.e.
public Generate(TState initialState, Func<TState, bool> condition, Func<TState, TState> iterate, Func<TState, TResult> resultSelector, IScheduler scheduler)
- EpicEng 13y agoYet, when calling that method, type inference will do its job and I will just pass in a few lamdas. What's the problem?
- platz 13y agoright, just using the method is not a problem. I'm saying it sucks if you have to write a whole bunch of methods like that because you are creating your own generators, etc...
- CmonDev 13y agoMethods with that many arguments are probably not a very good idea anyway.
- platz 13y agoUnfortunately there's probably not a great alternative in many cases such as this