Step 1: Login - Step 2: Vote! Login and vote now.
By bloid
via jroller.com
Published: Feb 29 2008 / 19:03
While there's still no decision made on the integration of closure to the Java language (AFAIK), I think the BGGA proposal is the most promising candidate. I'm quite confident it will eventually be integrated to the language.
Comments
axiomshell replied ago:
Is there any specific reason to have chosen the => on BGGA?
bloid replied ago:
It seems to have come about in the v0.3 specification:
http://gafter.blogspot.com/2006/10/closures-for-java-v03.html
Why => was chosen over -> ... I have no idea
daniel replied ago:
=> and -> are two distinct symbols in math. What's interesting is that => is usually associated with implication, while -> is more traditionally used for defining function signatures (f: R -> D | function f maps from reals to integers). => makes sense when defining an actual closure value like so (Scala syntax):
val closure = { s:String =>
s + " appendage"
}
-> would make more sense for defining function types, but it seems that for simplicity's sake, only one of them was chosen. Since -> has totally different semantic implications to those of us used to C++, => was probably chosen to avoid confusion.
M Easter replied ago:
Interesting discussion in comments on the site...
Voters For This Link (12)
Voters Against This Link (2)