News for hackers. Stuff that matters.
Re:Why Rust closures are somewhat hard by geezerjay on Tuesday September 11, 2018 @02:53AM (#17957657)
> It’s your program.

No, it's the C programming language. It has been like that since the 70s, and lots of people have been using it to develop high availability software for decades.

Just because some people never learned its basics nor are familiar with the subject that doesn't mean they have a point.

> The suggestion was that copy-everything-by-value solves the closure/memory issue with respect to copies.

No, that's quite wrong. The suggestion was thay passing objects by value would enable capturing variables without any of the slippery slope nonsense that was pointed out.

> This is also why C doesn’t have closures.

No, that's quite wrong as well. C doesn't have closures because no one bothered to add them, which is the exact same reason why C doesn't have namespaces or generics or any other feature ever. That's it.

Re:Why Rust closures are somewhat hard by djur on Tuesday September 11, 2018 @04:25AM (#17958018)
C has generics (within the limitations of its type system) since C11.

https://en.cppreference.com/w/c/language/generic