On Sat, Sep 5, 2009 at 3:28 PM, John Cowan<[email protected]> wrote: > Ray Dillinger scripsit: > >> This would involve rules about what (shared) variables are "in scope" >> in particular threads, with other threads not permitted to use them, >> right? Or with particular threads having "write" access and other >> threads having "read" access to the same variable? > > Unfortunately, shared variables aren't the half of it. Shared mutable > data structure is a much worse problem, because the compiler can't > catch it. If I pass the same list (in the sense of eq?) to two threads, > and each of them calls reverse! on it with the classical constant-space > algorithm, my program will become "free and wild and beyond good and > evil, with laws and morals thrown aside" (HPL, "The Call of Cthulhu"), > and (more to the point) unlikely to do the right thing. >
Not to diminish the difficulty of the problem, but I believe you can reverse the direction of closure conversion to reduce the general data structure problem to one only involving mutable variables. That is, I believe you're drawing a meaningless distinction. Lynn _______________________________________________ r6rs-discuss mailing list [email protected] http://lists.r6rs.org/cgi-bin/mailman/listinfo/r6rs-discuss
