Replies: 3 comments 3 replies
-
@gustavoguichard this was @douglasheldpacito idea during a pairing session where we were going back and forth both combinators @danielweinmann I have a feeling you will also have opinions on this |
Beta Was this translation helpful? Give feedback.
-
@diogob : do you mean having the same name for both functions? all: (...dfs: DomainFunction<T>[]) -> DomainFunction<T[]>
all: (dfs: Record<string, DomainFunction<T>>) -> DomainFunction<Record<string, T>> |
Beta Was this translation helpful? Give feedback.
-
I think having separate names is better. The learning curve might be a bit steeper, but it avoids confusion later on. Imagine the following dialog while pair-programming:
With separate names, and after both programmers know the names, the dialog would be:
|
Beta Was this translation helpful? Give feedback.
-
since
all
andcollect
do essentially the same combination except by the shape of input and output, they would be a great candidate for function overloading. In that case we would make it easier to explain and understand these combinators, reducing the number of arbitrary names.Beta Was this translation helpful? Give feedback.
All reactions