dire icon indicating copy to clipboard operation
dire copied to clipboard

Is there an advantage to the supervisor style?

Open didibus opened this issue 9 years ago • 4 comments

Hi,

I'm curious to know what's the advantage of using the supervisor (erlang style) instead of the *! functions?

Thank You.

didibus avatar Nov 24 '15 02:11 didibus

@didibus They don't mutate the functions in-place.

MichaelDrogalis avatar Nov 24 '15 04:11 MichaelDrogalis

And what are the disadvantages of mutating the function in place? Could it lead to issues? What situations should I be aware of where it would be problematic and I should instead use supervisor?

Thank you.

didibus avatar Nov 25 '15 19:11 didibus

I'm not aware of any issues, but the drawback is that you no longer have your original function. Same set of trade-offs as using a bash-in-place variable.

MichaelDrogalis avatar Nov 25 '15 19:11 MichaelDrogalis

Ok, I see, so you wouldn't be able to call the function without the hooks being a a part of it anymore.

So there shouldn't be any Clojure specific corner cases to watch out for? Like the possibility that if I use my function too early, it hasn't been hooked up yet, or that it is being changed in the middle of something using it, etc?

didibus avatar Jan 14 '16 17:01 didibus