This bears repeating; I don't see a future in loops that 'magically' know 
whether or not they can be parallelized.

Just to be absolutely clear:

Definitely has a future: A loop which is definitely parallelizable, but 
where either hotspot or the compiler (to be honest, sounds like a job for 
hotspot to me, and thus scala is absolutely no help here beyond making it 
simpler to write parallelizable code in the first place) ends up deciding 
that its faster to just sequentially run it, probably because there's a tiny 
number of loops.

I don't think this has a future: A loop where the compiler or hotspot (this 
sounds more like compiler territory to me) determines 'somehow' that this 
loop does not in fact rely on sequential processing, and thus gets the same 
treatment as above (i.e. parallized unless there's no point). In other 
words, a single looping construct which can be used BOTH for operations 
where the code depends on sequentiality, AND for operations where you don't, 
and that the mere act of making the code non-sequential-dependent 
'magically' ends up rewriting the whole thing down at the metal level (post 
compile and hotspot) as a parallelized operation.



Why? Well, think about it. This means that one tiny, seemingly innocuous 
change to some code, which so happens to either (A) actually be dependent on 
sequential processing, or (B) merely looks (to the compiler / hotspot) like 
it is, ends up completely rewriting the processing nature and especially 
speed _orders of magnitude_. I don't know about you, but a language with 
that feature sucks in my book. Java may overdo the 'too much magic is bad' 
concept, but there IS such a thing as 'too much magic', and that would be 
it.


I want a language where its easy to write 'run this in parallel, unless you 
determine its more efficient not to, and _TELL ME_ about problems in my code 
if it is processed in parallel'. Scala is admittedly a bit closer to this 
than java, but its not really the focus of that language. Also, Project 
Lambda will bring broadly the same benefits to java.

-- 
You received this message because you are subscribed to the Google Groups "The 
Java Posse" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/javaposse?hl=en.

Reply via email to