clojure-spec

About: http://clojure.org/about/spec Guide: http://clojure.org/guides/spec API: https://clojure.github.io/spec.alpha/clojure.spec.alpha-api.html
Franco Gasperino 2021-06-07T16:31:26.067100Z

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?

2021-06-07T16:45:06.067200Z

What makes you think that?

alexmiller 2021-06-07T16:48:35.068300Z

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

alexmiller 2021-06-07T16:49:07.068800Z

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

alexmiller 2021-06-07T16:49:41.069400Z

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

Franco Gasperino 2021-06-07T17:31:19.069500Z

composing, avoiding imperative style, while still supporting error context

emccue 2021-06-07T21:19:39.070400Z

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

emccue 2021-06-07T21:20:00.070700Z

i guess in practice thats all maps