Earlier quoted context omitted.
You forgot another line, it was actually: Creating NetworkComponent Dropping NetworkSocket Dropping NetworkComponent Dropping NetworkSocket Besides, you forgot another tiny detail, By replacing the socket now the port number is another one, and all processes that had open connections to that port will now crash, or have messages dropped without getting why. I can also fabricate plenty of error situations with Rust if…
> You forgot another line, it was actually: No I didn't. That line is totally irrelevant and does not apply to the socket that was passed to the NetworkComponent. It applies to the initial socket you've added which was not even present in the original example. You should have used Option to make your code equivalent. Anyway, your example failed to show use-after-close in Rust. > Remember, Rust isn't perfect, and only…
Exactly, so I can continue this charade by creating such example.
Rust is not a magic bullet, and just like with your "proof" I can provide similar "proof" with unsafe.
Or I can provide an example in D, with has a GC and C++ like RAII, or Swift that also has a GC (ARC is a GC algorithm) and C++ like RAII as well.
I have been playing this game about explainging how to do deterministic resource management in GC enabled languages since I learned Oberon in 1995.
It is always the same pattern.
- "GC languages cannot do X"
- "Actually you can partially achieve X with Y"
- "Yeah, but ....."
So whatever.