Wow i’m amazed by the contribution that everybody gave to this discussion!
I really wanna thank every one of you! I’ll have to take some time to be able to analyze everything and collect my thoughts tho!
For the moment i’ll reassure you, i don’t have any particular or urgent work-case where i need to apply this, actually i’m just a student working on his thesis about the limits and possible work-arounds on the infamous Hot Code Reloading in Erlang/Elixir!
This idea of having old (and yes, possibly very old, even months in my case) processes running old versions of the code came to me because i’m working on a little reminder app, where a server creates some processes which have a timeout and represent an event coming up.
In my case, as @Maria-12648430 and @nzok said, i’m guilty of not having followed the OTP and good rules that somebody should follow when working on a project in this language, always keeping in mind the idea of being able to hot code reload. Add to that some laziness and the idea that “if it works don’t touch it” and here you are!
This is why i came up with this idea of letting even the old processes live. If they can still “deliver” their job, in this case waiting for the timeout, and then die “gracefully”, while coexisting with new processes that have some new features or a different implementation of their state.
Again, it’s simply laziness, why should i have to work so “much” to upgrade the old processes and modify their state or kill them and recreate them based on their state when they died but now following the new version of the code if in “theory” they could keep living and doing their job?
This has OBVIOUSLY a large amount of problems, i can’t even imagine the mess it can create on a VM with tens of thousands of processes running all different versions and having different states.
But i also think that as @jhogberg said there could be a case where this is actually useful, maybe because of errors made in the past that now can’t be fixed or maybe this is what simply the userswants or needs (it’s 3a.m. and he wants to go to sleep), and who are we to negate that to him.
Again, thanks to everybody for such an interesting share of opinions, i’m very grateful and it has helped me a lot|