title: Java 7 style automatic resource management for Scala
body: <p>Java 7 has introduced automatic resource management:</p>
  
  <pre><code>try (BufferedReader br = new BufferedReader(new FileReader(path))) {
    return br.readLine();
  }
  </code></pre>
  
  <p>This will work with any class that implements <code>java.lang.AutoClosable</code>.</p>
  
  <p>I know there are several examples of doing automatic resource management in Scala, including one demonstrated by Martin Odersky.</p>
  
  <p>Is there any plan to add a language-level resource management to Scala, similar to Java's <code>try(...) { }</code>?</p>