Monday Aug 17, 2009

Using MethodHandles to Reconcile Closures and Stored Messages

Every new proposal to the Java language and/or the Java Virtual Machine is automatically weighted and compared with the different proposals for closures for the Java Programming Language. The current JSR292 proposal is no exception since the versatile MethodHandle introduced in JSR292 can be used both to implement a closure as well as a stored message.

The implementation of closures and stored messages within a language can be evaluated according to the principles of duality, correspondence and invokability. By doing so we find that MethodHandles have to support co/contra variance and autoboxing as well as implicit downcast/unboxing from Object.

Also, one commonly discussed reason for adding closures to Java is wrong, but I will make up for this by adding a new reason for restricted closures.

[Read More]
About

bocadmin_ww

Search

Categories
  • Oracle
Archives
« August 2009
SunMonTueWedThuFriSat
      
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
18
19
20
21
22
23
24
25
26
27
28
29
30
31
     
Today