closures after all?

Bob Lee crazybob at crazybob.org
Fri Nov 20 11:55:10 PST 2009


On Fri, Nov 20, 2009 at 11:46 AM, Reinier Zwitserloot <
reinier at zwitserloot.com> wrote:

> What exactly would, say, an ARM-guarded OutputStream look like with
> your idea, Neal?
>

Here's an example written with ARM that we could try rewriting:

    try (Reader fin = new FileReader(file);
        BufferedReader in = new BufferedReader(fin)) {
      // Parse the first line and return the result.
      return parse(in.readLine());
    } catch (IOException e) {
      logger.log(e);
      return null;
    }

Thanks,
Bob



More information about the coin-dev mailing list