The Artima Developer Community
Sponsored Link

Java Buzz Forum
Information on Java Closures from Guy Steele of Sun

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
dion

Posts: 5028
Nickname: dion
Registered: Feb, 2003

Dion Almaer is the Editor-in-Chief for TheServerSide.com, and is an enterprise Java evangelist
Information on Java Closures from Guy Steele of Sun Posted: Sep 28, 2004 7:51 AM
Reply to this message Reply

This post originated from an RSS feed registered with Java Buzz by dion.
Original Post: Information on Java Closures from Guy Steele of Sun
Feed Title: techno.blog(Dion)
Feed URL: http://feeds.feedburner.com/dion
Feed Description: blogging about life the universe and everything tech
Latest Java Buzz Posts
Latest Java Buzz Posts by dion
Latest Posts From techno.blog(Dion)

Advertisement
This thread gives us an insight into why full closures aren't currently in Java: > Actually, the prototype implementation *did* allow non-final > variables to be referenced from within inner classes. There was > an outcry from *users*, complaining that they did not want this! > The reason was interesting: in order to support such variables, > it was necessary to heap-allocate them, and (at that time, at least) > the average Java programmer was still pretty skittish about heap > allocation and garbage collection and all that. They disapproved > of the language performing heap allocation "under the table" when > there was no occurrence of the "new" keyword in sight. I find this very ironic. It is too bad that programmers who do not use Java *because* it doesn't have closures were not asked about this issue, instead of those programmers who were already willing to make such a compromise. This decision insured that this potential new audience's desires will not be met. Interesting indeed. I do hope that in the future people are polled again on their usefulness. A lot of us were C/C++ programmers when we started on the Java bandwagon and were really worried about the heap and such. Now many of us have moved on and have gotten into languages such as Ruby/Groovy/insert your favorite and have been able to evolve our thinking. (Of course, some of us were LISPers from way back, and this was, like, duh :)

Read: Information on Java Closures from Guy Steele of Sun

Topic: [Sep 17, 2004 13:08 PDT] 15 Links Previous Topic   Next Topic Topic: Closures in C# 2.0 (Did you hear that Sun?)

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use