Fork me on GitHub

On this Independence Day weekend, why not try out a tall glass of anonymous function syntax independence? To liberty ๐Ÿป #%/% - johnmn3/perc Now with kwargs

๐Ÿ—ฝ 12
๐Ÿ‘ 4
Alex Miller (Clojure team)04:07:56

I honestly donโ€™t get why you would do that to yourself. Why not just make a fn?

๐Ÿ‘† 4

Verbosity of fn syntax. Concision


I mean, I'm not sold on the syntax either ๐Ÿ™‚ but I'm just betting that it's at least worth exploring


If perhaps just for fun exploration or some interesting use cases


I actually recently did something like that for ordinal argument with defaults


though ended up not using it because it's missing the case of passing in a var rather than a vector literal. But it's always fun going down macro rabbit holes


I guess I'll start a #perc channel to discuss it


One critique is I would say is the tradeoff you make to be consice I feel makes it lose some of its clarity. I think most fns that would need to do ocmplex destructuring would be better off as a named function anyway. in most languages that support unnamed functions they have a limited and straightfoward use case (simple events, basic mapping, etc) anything more complex can be better understood as a name in place of a more complex function.


But, sometimes, when that function is a value in a map, the function already has a name, in the form of the key... why keep changing the name? Head on over to #perc for further discussion. I'm going to riff on some of the rationale over there.


And, one more time ...