News for hackers. Stuff that matters.
Re:Rust and Go by pcwalton on Friday November 07, 2014 @07:34PM (#8575457)
The article is about Rust. In Rust, the type of the closure indicates whether it can mutate externally visible data (and therefore race on it).
Re:Rust and Go by BrianHV on Saturday November 08, 2014 @12:33AM (#8576133)
Having just started reading the Rust guides, I'm curious: can the closure type actually ensure it doesn't mutate any externally visible data, or does that only apply to memory? Can declare that a closure doesn't (or shouldn't be allowed to) write to disk or hit a database?
Re:Rust and Go by jaekwon on Friday November 07, 2014 @07:59PM (#8575563)
Gotcha! So will Rust then auto-parallelize these "pure" closures?
Re:Rust and Go by pcwalton on Friday November 07, 2014 @08:24PM (#8575640)
We'd like to have generic APIs in the future that will allow idiomatic automatic data parallelization. Niko Matsakis has been thinking about this for quite a while. Stay tuned :)

(Note that Servo has been using this type system feature for a while now to prevent data races in our massively parallel CSS layout code.)

Re:Rust and Go by bjz_ on Friday November 07, 2014 @11:43PM (#8576046)
> Niko Matsakis has been thinking about this for quite a while. Stay tuned :)

Arrg, you have me excited now!

Re:Rust and Go by ufo on Saturday November 08, 2014 @12:10PM (#8577460)
I wouldn't put my hopes very high on this. They tried doing this kind of ubiquitous automatic parallelization in Haskell but they ran into parallelization overhead issues because its very hard to have the computer figure out the correct parallelization granularity all by itself.