arichiardi / fonda

An async pipeline approach to functional core - imperative shell.
Apache License 2.0
22 stars 1 forks source link

The name is not really used and gets in the way #26

Closed arichiardi closed 5 years ago

arichiardi commented 5 years ago

I have noticed that the utility of having a name is not really high and moreover having to pass a :name key every time can be tricky - for instance when generating processors dynamically:

(defn journey-processor-tap
  [index command]
  (let [uuid (:uuid command)]
    [{:processor #(hash-map :response (get-in % [:journeys index])
                            :command command)
      :path [:journeys index]
      :name (str "hack-" uuid)}   ;; this should be improved))

If we passed the symbol of the function instead of the function itself we could auto generate the name for instance.

ElChache commented 5 years ago

Agree, the name should be optional. But I think it shouldn't be removed, as it can still can be used by helper function in order to replace impure steps with mocks when testing

arichiardi commented 5 years ago

Solved with #33