Fork me on GitHub
#clojure-spec
<
2021-06-07
>
Franco Gasperino16:06:26

Having watched the 2018 talk on monads (Maybe Not) and appreciating the case made for place oriented programming using maps and spec, the question i have - Does this lead to design of most non-pure functions accepting and returning maps (almost) exclusively?

delaguardo16:06:06

What makes you think that?

Franco Gasperino17:06:19

composing, avoiding imperative style, while still supporting error context

Alex Miller (Clojure team)16:06:35

in Clojure 1.11, you can pass a trailing map to a function that takes kwargs, so kwarg style also accepts map invocation

Alex Miller (Clojure team)16:06:07

positional args are a tradeoff - they make invocation easier by making the arg name implicit

Alex Miller (Clojure team)16:06:41

but that also means they are fragile to positional changes, whereas maps / kwargs are not

emccue21:06:39

If there wasn't a perf hit for it, I could very much see myself having all args named Objective C method call style

emccue21:06:00

i guess in practice thats all maps