Skip to content
This repository has been archived by the owner on Nov 14, 2017. It is now read-only.

Is there an advantage to the supervisor style? #32

Open
didibus opened this issue Nov 24, 2015 · 4 comments
Open

Is there an advantage to the supervisor style? #32

didibus opened this issue Nov 24, 2015 · 4 comments

Comments

@didibus
Copy link

didibus commented Nov 24, 2015

Hi,

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

Thank You.

@MichaelDrogalis
Copy link
Owner

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

@didibus
Copy link
Author

didibus commented Nov 25, 2015

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.

@MichaelDrogalis
Copy link
Owner

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.

@didibus
Copy link
Author

didibus commented Jan 14, 2016

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?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants