News for hackers. Stuff that matters.
Re:Crystal: Fast as C, Slick as Ruby by duaneb on Thursday August 04, 2016 @02:16AM (#12223737)
Memory management is difficult, extremely difficult, to get correct in the way rust does. I don't think I've seen a leak or bad dereference in years. The only way it really manages this is by tying references into what amounts to a proof assistant. Every simpler method of which I can think either sacrifices capability (e.g. no references at all; only raii + copy on write) or it becomes a GC with all its wonderful trade offs.

GC isn't terrible, though. Azul has struck an amazing balance between latency and eagerness—even if you can't afford it the technology does exist. If you don't have latency, memory restrictions, or embedding requirements, rust may be overkill.

Re:Crystal: Fast as C, Slick as Ruby by quotemstr on Thursday August 04, 2016 @12:27PM (#12226642)
> Memory management is difficult, extremely difficult, to get correct in the way rust does

Memory management isn't hard --- you just need to pay attention to detail and not say "YOLO, let's abort on OOM" like the Rust stdlib does. Rust is an unacceptable language for anyone who cares about robustly responding to heap exhaustion.

Re:Crystal: Fast as C, Slick as Ruby by Turing_Machine on Thursday August 04, 2016 @09:40PM (#12229589)
"Memory management isn't hard --- you just need to pay attention to detail"

You're quite right. The problem is that every bit of attention you spend on that detail is attention that you're not spending on details that are actually solving your problem.

I programmed in C for decades. I do not miss malloc() and free() in the least.

(I still do use C when the situation warrants, but the situations where it is warranted are becoming rarer and rarer with each passing year).

Re:Crystal: Fast as C, Slick as Ruby by vardump on Thursday August 04, 2016 @12:20PM (#12226580)
> If you don't have latency, memory restrictions, or embedding requirements

Add power consumption to that list.

Re:Crystal: Fast as C, Slick as Ruby by the_duke on Thursday August 04, 2016 @05:00AM (#12224312)
I think you meant

-> 'extreymely difficult to get INcorrect in the way rust does'

Re:Crystal: Fast as C, Slick as Ruby by Ygg2 on Thursday August 04, 2016 @05:19AM (#12224364)
Unless this is a joke, its meaning is correct, i.e. "proven correct like Rust".
Re:Crystal: Fast as C, Slick as Ruby by StavrosK on Thursday August 04, 2016 @06:32AM (#12224609)
I think he misunderstood the comment to mean "it's hard to get memory allocation wrong when writing a Rust program".