News for hackers. Stuff that matters.
Re:The borrowchecker is what I like the least about Rust by amelius on Saturday July 19, 2025 @06:55PM (#44620224)
Idiomatic programming in a functional language requires garbage collection. There is a reason languages like OCaml and Haskell have a garbage collector. Without it, programming in these languages would be completely different.

If you look at it from that perspective, then Rust is the hobby language.

Re:The borrowchecker is what I like the least about Rust by zx8080 on Saturday July 19, 2025 @08:47PM (#44620894)
> Without it, programming in these languages would be completely different.

How different?

Re:The borrowchecker is what I like the least about Rust by ksenzee on Saturday July 19, 2025 @10:23PM (#44621402)
I believe you meant "Different how?"
Re:The borrowchecker is what I like the least about Rust by dgfitz on Saturday July 19, 2025 @09:02PM (#44620961)
They addressed that: completely.
Re:The borrowchecker is what I like the least about Rust by zozbot234 on Sunday July 20, 2025 @01:38AM (#44622276)
> Idiomatic programming in a functional language requires garbage collection.

Rust has functional programming features and no garbage collection, because the borrow checker can tell when a closure will outlive the references in its captured environment. We used to think that would not be feasible other than perhaps in very special cases - hence the need for GC to keep that environment around - but Rust proved that wrong quite convincingly.

Re:The borrowchecker is what I like the least about Rust by amelius on Sunday July 20, 2025 @05:59AM (#44623520)
"Having FP features" does not mean "allow an idiomatic FP programming style". If this were the case, we'd be seeing a revolution in functional programming now. It's not like the FP community is slow to adopt good ideas. In fact, many innovations that lead to the invention of the borrow checker came from the functional programming world (linear, affine types, effect systems).
Re:The borrowchecker is what I like the least about Rust by zozbot234 on Sunday July 20, 2025 @06:33AM (#44623740)
What's an "idiomatic FP programming style"? Is typical LISP code "FP" enough? That uses GC of course, but other than that it's often high-level enough to be quite comparable w/ modern Rust.
Re:The borrowchecker is what I like the least about Rust by dontlaugh on Sunday July 20, 2025 @04:49AM (#44623146)
Not necessarily GC, but any kind of automated memory management that allows composition.