On Tue, Oct 12, 2010 at 02:31:26PM +0200, Carl M?sak wrote: > Ben (>): > > If perl6 can statically (at compile time) analyse subroutines and > > methods and determine if they're reentrant, then it could > > automatically use the lightest weight threads when it knows that the > > entry sub won't have side effects or alter global data. > > I'm often at the receiving end of this kind of reply, but... > > ...to a first approximation, I don't believe such analysis to be > possible in Perl 6. Finding out whether something "won't have side > effects" is tricky at best, squeezed in as we are between &eval, > exuberant dynamism, and the Halting Problem.
If one knows what variables are shared, some degree of side effect potential can be determined. But yes, in general, a tough problem. Brett > > // Carl -- B. Estrade <estr...@gmail.com>