News for hackers. Stuff that matters.
Re:Rust means never having to close a socket by kibwen on Tuesday October 07, 2014 @03:26PM (#8423388)
I agree that refcounting is a great and usable compromise in this space, but your own comment flirts with why I don't think modern languages are chomping at the bit to base resource management on it: concurrency.

Granted, I have no idea how much overhead is imposed by atomic operations vs. a stop-the-world or concurrent GC (if anyone has some data, I'd love to see it!). But given how it's become de rigeur for new languages to come with a baked-in concurrency story and emphasize concurrent applications, I don't blame them for not wanting to tie themselves to the RC cart.

Re:Rust means never having to close a socket by chetanahuja on Tuesday October 07, 2014 @07:50PM (#8424628)
"Granted, I have no idea how much overhead is imposed by atomic operations vs. a stop-the-world or concurrent GC."

An atomic read/write/increment/decrement is a non-blocking (from the point of the view of a user code running on the CPU) CPU operation. The CAS operations required to do atomic inc/dec are relatively expensive compared to normal memory read/writes of course but nowhere near the scale of stop-the-world GC (where all threads in the runtime have to be blocked for a potentially large amount of time, sometimes measured in whole seconds or even 10's of seconds for large heaps).

Anyone who has had to troubleshoot JVM's handling large heaps (in the ~10GB range) quickly learns to love deterministic costs of refcounted resource management.

Re:Rust means never having to close a socket by pjmlp on Wednesday October 08, 2014 @03:39AM (#8425696)
That is an implementation issue.

There are plenty of JVMs to choose from, even pauseless ones.

Re:Rust means never having to close a socket by chetanahuja on Thursday October 09, 2014 @12:29PM (#8433413)
Hah.. Implementation issue. That's a good one. It's just like an SUV not being landmine proof is an implementation issue. Just because somewhere a landmine proof humvee exists doesnt mean its attainable or practical for an ordinary user.