Well I got too disappointed by how the java developers added features. Really. Probably they had no choice, but making it like that, but it's still ugly. I hate the new Lambdas in JDK 8, for example. They're nothing but little syntax sugar (+ clojures, but you can fake them very easy too).
So in JDK 8 it's like that:
1 2 3 4 5
| int result = 0; new Thread(() -> { result = 5; }).start();
|
And in JDK 7 it could be translated like that:
1 2 3 4 5 6 7 8 9
| class Closure { int result = 0; } final Closure closure = new Closure(); new Thread(new Runnable() { public void run() { closure.result = 5; } }).start(); |
So I started switching to scala.
1 2
| var result = 0 new Thread(() => result = 5).start(); |
Or much cooler stuff:
1 2 3 4
| List("Hello", " ", "world").foreach(println)
"Hello world".split(" ").foreach(println(_ + " "))
|
Anyways, enough code rambling, also, lambdas aren't the only thing which made me switch to java. Also, I started learning scala and scheme
before trying out JDK 8 lambdas. And they pretty much disappointed me. They're still explicit classes. Really? :/
One last thing I'd like to show, which is
always handy for me

1 2 3 4 5 6 7 8 9 10
| def time(thunk: => Unit) = { val begin = System.currentTimeMillis() thunk System.currentTimeMillis()-begin } val timeInMillisceconds = time { computePi() }
val timeInMilliseconds = time(computePi) |
So, KTHXBYE
