Fork me on GitHub
#clojurescript
<
2020-04-10
>
Mikaelman15:04:46

m,mnbvnmjkjhghjiu6786§1q>qweewaASDRTYUIOPŨ

Mikaelman15:04:28

’-ÄÅÄÖ_PLÖ.,§§§1´

20
😎 4
Bobbi Towers22:04:50

Should we send help?

manutter5115:04:36

On the Internet, sometimes people do know when you’re a cat.

20
4
runswithd6s16:04:58

We just had an interesting discussion surface while doing pull request reviews. A clean-up of our code was proposed to remove named functions, (fn some-name []...) , when technically not needed. However, these were originally added with this advise in mind: https://github.com/day8/re-frame/blob/master/docs/Debugging.md#say-no-to-anonymous Any opinions? "To Anonymous, or Not To Anonymous"

dnolen16:04:35

@gchewie it just seems like bad advice to me

dnolen16:04:51

not using anon fns blankly is not idiomatic

runswithd6s16:04:58

I'm relatively new to the game, so I didn't have any skin in the game, but I agree that it didn't seem to track with almost every example I've seen for use of (fn..).

p-himik16:04:44

It seems to me to be your usual "practical vs idiomatic" debate. Re-frame advice may be good in the particular context of Reagent components, that's it.

dnolen16:04:03

that's what I'm saying don't generalize that advice

dnolen16:04:14

if you took that advice and started naming all anon-fns you've gone wrong

dnolen16:04:46

if you're just doing that for Re-frame handlers then that might help you use Re-frame

dnolen16:04:58

and I don't have any opinions about that

OrdoFlammae16:04:55

Does it really help stack tracing that much? Usually I just look for the function+line that created the anonymous function in the first place, not the anonymous function.

p-himik16:04:24

If you don't do that, you will see errors like "Cannot render component div > > > > > button". Those spaces between >'s are anon components. Similar thing with event handlers and subs.

dnolen16:04:37

it can help in some JS environments

dnolen16:04:43

there's no standard about stacktraces

OrdoFlammae16:04:46

On the other hand, I haven't had to deal with a whole lot of ClojureScript stack traces yet, I've mostly been using Clojure, and have only begun to start learning ClojureScript.

dwhite4419:04:54

has anybody used recurly inside a re-frame application? if so, is there an easy-ish way to do it?