
Java 7 : More concurrency - fogus
http://www.baptiste-wicht.com/2010/04/java-7-more-concurrency/
======
jrockway
Still no composable concurrency primitives. Maybe Java 8 will catch up to GHC
from 5 years ago.

~~~
sparky
For the benefit of the philistines, what composable concurrency primitives
does Haskell ca. 2005 have, and which would map well to an imperative OO
language?

------
justlearning
fwiw - there is the Kilim framework focusing on the actor model.
([http://www.ibm.com/developerworks/java/library/j-javadev2-7....](http://www.ibm.com/developerworks/java/library/j-javadev2-7.html))

------
ww520
That looks related to the actor-model for parallel processing.

~~~
runT1ME
How so?

------
WilliamLP
Duke Nukem Forever: More weapons! More enemies!

~~~
bad_user
You can play with most improvements coming in JDK7 right now ...
<http://download.java.net/jdk7/binaries/>

~~~
WilliamLP
You can probably find prototype versions of DNF out there too if you look hard
enough. I fully realize that "Java is dead" posts are heavy down-mod territory
right now because there are so many emotional and financial ties to the
platform, but wait a few years.

~~~
scott_s
DNF was never released. Java 7 is being released.

The downmods are probably coming not because people have emotional or
financial ties to the platform, but because you made a bad comparison between
two unrelated things in a way that adds nothing. In other words, your comment
is indistinguishable from trolling.

~~~
WilliamLP
What do you think the odds are that it will be 2011 and still with no clear
concrete release date planed for Java 7? I think very good. The plural of
tomorrow is "never", here.

People are optimistic about Java as an evolving unified platform when there is
no such indication. The important Java pioneers have abandoned the ship.
Google is hedging their bets on Android by divorcing itself from the JVM and
the core libraries. History shows that such things (open or not) require
strong unified leadership, and Java has none. Even so, what indications of
Java 7 being agreed on and adopted are there that should make someone more
optimistic than about say Python 3 or Perl 6? The fact is that Java 6 is good
enough for the spaces where it is currently used.

Java 7 will have no place in the mobile world. (Though a variant of Java,
taken in proprietary directions by Google, might.) In the server space it has
lost and is rapidly losing more ground to C# (by nearly all accounts now a
superior platform which is evolving to be better), and other languages built
on the JVM.

People have saying Java was in severe decline for many years, but never have
the signs been so consistent and clearly aligned as they are now.

~~~
bad_user
> _People are optimistic about Java as an evolving unified platform when there
> is no such indication_

You're not asking the right people ... <http://groups.google.com/group/jvm-
languages>

> _Google is hedging their bets on Android_

That's because Dalvik is a register-based VM (versus stack-based) optimized
for efficiency on a mobile device that's using solid-state memory (which has
sloooow access times). The bytecode itself lends to better interpretation (and
it wouldn't be useful on a general purpose PC where you have the resources to
JIT).

> _what indications of Java 7 being agreed on and adopted are there that
> should make someone more optimistic than about say Python 3 or Perl 6?_

InvokeDynamic.

Dynamic languages on top of the JVM are already fast. Jython / JRuby are
already ahead of the reference interpreters in many benchmarks. And in real-
world projects it is much nicer to drop to Java for bottlenecks than to C/C++.

In JDK7 InvokeDynamic provides a way to specify a handler for a call-site the
JVM doesn't understand (and I think the caching is at least monomorphic). Thus
it is possible for dynamic calls (with an unknown interface) to be as fast as
virtual methods invocations (blazingly fast on the JVM).

And for JDK6 there's even a backport (using Java agents) for backward
compatibility (also with speed improvements).

I haven't seen any real project (or any significant open-source project other
than Parrot / Perl6 itself) that's based on Perl 6. And it was started when?
10 years ago?

And many people would argue that Python 3 only brings a couple of syntactic
improvements. Only Unladen Swallow makes it exciting for me.

Until then, some reasons why it's not exciting for me ... GIL (no parallel
threads), reference-counted (huge memory usage on long running processes),
still slow as fuck for expensive computations.

Python is my favorite language, but I'm moving gradually to using Jython more
and more.

> _losing more ground to C# (by nearly all accounts now a superior platform_

No, not really. Both have strengths and weaknesses.

~~~
chromatic
_I haven't seen any real project (or any significant open-source project other
than Parrot / Perl 6 itself) that's based on Perl 6. And it was started when?
10 years ago?_

That sounds a bit like the No True Scotsman fallacy. (What makes a project
"real" or "significant"?) Regardless, why should that matter? How many real
projects do you know of based on Java 7, or even Python 3? (Python 3 is
_older_ than Perl 6.)

~~~
bad_user
Sorry, that came out wrong.

I actually took a look at Parrot ... great tools for language designers,
flexible type-system (oh god, the type system in the JVM is horrible).

I really hope you guys can pull it through.

I was judging from my POV ... I want to implement a language than I can use as
soon as the parser is finished (I'm not enough of a man to implement my own VM
or to deal with non-mainstream choices, although that may prove to be better
long-term).

~~~
chromatic
Our biggest lack right now is of documentation for the compiler tools. I hope
to address that in the next few months.

