Skip to main content

Blog Archive for forax during November 2009

Mark Reinhold recently blogs about the renaissance of closure in Java (*). In his blog, he also wrote that in order to have closures in Java, Java will have to include another feature named extension methods. As you may already know, I'm a big fan of closures but the introduction of extension methods in Java really scary me. * Ok, they are more lambdas than closures. Why extension...
Java VM embodies continuations now (not in production, in a hacking mode :), This post shows how to write a non-blocking server with continuations. Why using continuation with non blocking IO There are two models when you deals with IO: the thread model: read and write calls block until they at least read one caracter or write the whole buffer, so one use thread to be able to...
Lukas Stadler is my hero, at last JVM summit, he just explain how coroutine and friends can be implemented in the VM and guess what, it now works (currently only with C1). Let's try to implement something with it. Generator I have always wanted to have generator in Java. After all, Python have this feature, Ruby and C#(*) too. A generator is a way to define an iterator but instead of...
It seems that "lite" closure will be in JDK7. I really don't care about the surface syntax but I hope that the runtime of such closure will be on top of JSR 292 method handle. cheers, Rémi
As you perhaps already know, jdk7 milestone 5 (jdk7b76) is out. This new milestone contains a lot of bug fixes and improvements. This blog entry is about two of them: Strings in switch Method handles (yes again) Switch on String This one of the small proposal changes (from Coins's project) to Java language in order to allow to switch on String values. Let's take an example...
Let me introduce a new language named pseudo (Why this name ? Why another language ? Why God ? all these questions will be answered in a later blog). One great feature of this language is that it allows gradual typing, i.e. you can assign a type to a parameter, a local variable, etc. or not. If a variable as no type, the compiler consider it as any. You can assign any value...