InfoQ

Interview

Joshua Bloch on Closures, Resource Management, Google

Interview with Joshua Bloch on Nov 07, 2006 11:50 AM

Community
Java
Topics
Programming
Tags
Java SE ,
Closures ,
Language Features
Summary
Core Java language designer Joshua Bloch talks about the need for Closures, Functional Programming, Java's need for better resource management, Java Puzzlers, and cool stuff Google is doing with Java. Recorded at www.javazone.no conference, Norway's best Java conference.

Bio
Joshua Bloch is a Principal Engineer at Google. He led the design and implementation of numerous Java platform features, including the Java Collections Framework. He is the author of the Jolt Award-winning book Effective Java. He holds a Ph.D. in Computer Science from Carnegie-Mellon University and a B.S. in Computer Science from Columbia.
Josh can you tell us a bit about yourself and what you are doing at Google these days?
Are you still heavily involved with Java's evolution even though you're at Google?
What's going on in Java these days that excites you?
Where do you stand on the closures debate?
So Java itself should not approach more functional programming style?
What else do you think Java needs from a language perspective?
About the resource management idea: what are the use-cases for this, why do we need it?
As the Java platform becomes multi-lingual, how do you see the standards bodies functioning and the platform itself evolving?
Now that you're not at Sun anymore. Can you give us your honest opinion on how you think open-source java should be governed?
If you were all powerful and you could change two things about how Java evolved over the last 8-9 years what would you change?
What is Google doing with Java?
Can you tell us more about this awesome Java infrastructure at Google?
What's new with Puzzlers?
What's your favorite puzzle?
show all  show all
Using block for Java by Jonathan Allen Posted Nov 8, 2006 12:40 PM
The Reference Puzzle by Scott Gelb Posted Nov 8, 2006 9:13 PM
Thumbs up for the text ! by ZedroS Schwartz Posted Nov 9, 2006 1:56 PM
Listening to Josh by Alex Popescu Posted Nov 11, 2006 6:59 AM
Resourcing Problem. by Geoffrey Wiseman Posted Nov 13, 2006 10:28 AM
a using()-like block for Java by Roger Voss Posted Nov 24, 2006 11:15 AM
  1. Back to top

    Using block for Java

    Nov 8, 2006 12:40 PM by Jonathan Allen

    I really like this idea, but as the Joshua says it needs to have more than one resouce on the same line. I don't think this would be hard, as VB does it with its Using block.

  2. Back to top

    The Reference Puzzle

    Nov 8, 2006 9:13 PM by Scott Gelb

    In case anyone is interested, in the last part of the interview Dr. Bloch makes a reference to Puzzle 85: Lazy Initialization (pg. 205 of Java Puzzlers).

  3. Back to top

    Thumbs up for the text !

    Nov 9, 2006 1:56 PM by ZedroS Schwartz

    Hi That's great you put a written translation of the interview. Good on you ! Cheers, ZedroS

  4. Back to top

    Listening to Josh

    Nov 11, 2006 6:59 AM by Alex Popescu

    Listening Josh speaking is always an amazing experience. The resource auto-manageable blocks sounds very well and I would definitely be happy to have something like this as soon as possible. Even if I haven't hit myself many of the "issues" Josh would have theoretically changed, still just thinking about them make you see things pretty different. Excellent interview! ./alex -- .w( the_mindstorm )p.

  5. Back to top

    Resourcing Problem.

    Nov 13, 2006 10:28 AM by Geoffrey Wiseman

    Completely agree that the resourcing problem is one that Java needs a better solution for, which is definitely something that Closures are used for in other languages. Ruby's full of idioms like this where you 'use' a connection with a block, rather than opening, doing stuff, then closing, and catching.

  6. Back to top

    a using()-like block for Java

    Nov 24, 2006 11:15 AM by Roger Voss

    The thing about C# using() is that it only works with objects that implement IDisposable interface. There is no similar universal interface in Java for standardizing the cleanup of non-memory resources. The various resources that one might want to subject to such a language construct in Java have varying conventions as to what to invoke. So in the end there might need to be a way to associate a closure in which one places the code that invokes whatever method does cleanup operation. Also if this new feature is made to work with multiple resources, then how does this new construct insure that each resource cleanup method gets invoked (i.e., how to automatically deal with the potential of a given cleanup method to throwing an exception)? If closures are introduced as part of the solution for this, there is possibility that a cleanup method throws a checked exception so the closure must deal with that. I'd prefer not to have to wrap calls in try/catch - hopefully a new construct for cleaning up deterministic resources could automate dealing with this concern.

Educational Content

Bindings, Platforms, and Innovation

This presentation focuses on the Internet and separating myth from fact, history from the future, and the mundane from the imaginative. Bob Frankston presents a vision of what could and should be.

Orchestrating Long Running Activities with JBoss / JBPM

This article explores the use of JBoss and jBPM to implement design solutions that effectively address the issue of orchestrating long running activities.

Neo4j - The Benefits of Graph Databases

This presentation covers the use of graph databases as an optimal solution for data that is difficult to fit in static tables, rapidly evolving data or data that has a lot of optional attributes.

Realistic about Risk: Software development with Real Options

This session introduces Real Options and shows how it can help in running your project. Real Options is a decision-making process that can be used to manage risk.

Communication Flexibility Using Bindings

This article discusses the use of bindings on services and references (including the instance of non-configured bindings) as the means to implement SCA communications in a Web and SOA environment.

Writing DSLs in Groovy

After a short introduction to DSLs, Scott Davis plays with the keyboard showing how to approach the creation of a DSL by typing working snippets of Groovy code that get executed.

Scaling Agile with C/ALM (Collaborative Application Lifecycle Management)

IBM Rational and InfoQ present, Scaling Agile with C/ALM, an eBook showing organizations how to become “finely tuned software delivery machines” by enabling team integration and scaling.

Concurrent Programming with Microsoft F#

Amanda Laucher presents a real life enterprise application written in F#. She shows actual code snippets, explaining design decisions and suggesting how to use some of the F# constructs.