On Sun, 11 Dec 2016 22:47:21 +0000, sarn wrote: > On Saturday, 10 December 2016 at 22:55:22 UTC, Chris Wright wrote: >> It's always a bit weird when people talk about "resources" as a >> unification of memory, files, sockets, etc. My programs exist to fill >> memory and then push bits of memory around. At least 99% of my >> "resource" usage is heap objects. If it gets slightly harder to deal >> with memory but utterly trivial to deal with every other type of >> resource, that's a net loss. > > But if your performance is hosed because you're leaking database > connections, "99% of your resources" being heap objects means absolutely > nothing.
Okay, and D gives me sufficient tools to not leak database connections under typical workflows. So does C#. So does Python. So does Java, these days. The last time it's been even vaguely annoying for me was with nodejs, thanks to callback hell, and even then it was only an annoyance. The only type of resource I have to deal with that isn't a database connection or memory is a socket. They don't go out of scope before they're closed. Ever. So that automatic resource cleanup stuff doesn't even help there. My handling of non-memory resources that require any sort of cleanup takes up like 3% of my code, constrained to two files. (I measured.) So it's going to be right quick for me to isolate any problems. Rust is a solution to a problem that's already solved, as far as I'm concerned. If I had a significantly different use case, I might see more benefit, but at present I don't.
