News for hackers. Stuff that matters.
Re:Porting a Haskell graphics framework to Rust by dbaupp on Sunday May 01, 2016 @08:24AM (#11605916)
Closures in other languages like Haskell, JavaScript and Python (and almost certainly Elm too, I've never used it and hence don't know for sure) are similar to the `Rc<Fn(...) -> ...>` type in Rust. In fact, if absolutely necessary, one could probably use that everywhere.

Stuff like this is one of the trade-offs in Rust: control over exactly how closures behave (if allocations are necessary, if virtual calls are necessary when calling it) is balanced with/detracts from how much typing one needs to do to get them to work.

Re:Porting a Haskell graphics framework to Rust by vvanders on Sunday May 01, 2016 @11:44AM (#11606587)
Duh, dunno why I'd forgotten Rc.

I'm still not a huge fan of the extra allocation(and chance for cycles) but I stand corrected that it does work, kudos.