2009/11/18

Devoxx 2009: JDK 7 Update

18/11/2009, Mark Reinhold

higlight: Closures in java are BACK!

Aims of JDK7
  • modular platform
    • JDK7 status:
      • 13MB download with pack200 compression
      • difficult to support smaller (embedded) hardware
    • → Jigsaw project
      • low-level modules, at the rt.jar level
      • language support: module-info.java file
        • explicit module / version requirements
        • create simpler OS-specific package, with correct dependencies (e.g. deb-packages)
      • OSGi interoperability
  • multi-lingual support
    • better JRuby, Jython support on the JVM
    • InvokeDynamic
    • “Da Vinci Machine project”
  • productivity enhancement
    • “Project Coin”
    • language changes that improve programming experience. E.g.:
      • type inference with the <> (aka. 'diamond') operator: Map <String,String> m = new <> HashMap();
      • split numbers with '_' for better readability: int a=123_456_789;
      • support binary notation: int b=0b00100100001;
      • Lists: direct construction and access to set/get with []: a[4] = b[5];
      • Map: direct construction and access to set/get with {}: a{“b”}=”xyz”;
      • auto-close Closeable interfaces: try(File f = new File()) where f is always closed correctly.
  • performance
    • multi-cores are there! → java support needed.
    • → fork/join framework
    • Dual-Pivot Quicksort
    • Closures: “It's time to add them” – I thought this was dropped from Java7 plans...
      • needed:
        • function literals
        • function types
        • extension methods
      • “doesn't fit in java”:
        • non-local control transfer
        • capture non-final vars
        • library-defined control structures
When?
  • Planning shifted
  • Milestone 10: 2010/09/09: release candidate

No comments: